chafiq / tablebundle Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
The Anchor block in the extensions.html.twig does nothing with the icon
parameter passed in the column definition.
Hi,
Just see an error in example when you do the QueryBuilder
public function getQueryBuilder(ObjectManager $entityManager, array $options) {
return $entityManager
->getRepository('AcmeMyBundle:City')
->createQueryBuilder('c')
->innerJoin('t.state', 's');
it's strange because 't' is not defined before. So, maybe it is :
` public function getQueryBuilder(ObjectManager $entityManager, array $options) {
return $entityManager
->getRepository('AcmeMyBundle:City')
->createQueryBuilder('c')
->innerJoin('c.state', 's');
Thank you for this Bundle!!
I've created a custom column type that I want to use to display boolean values.
I built it to extend IconType.
config.yml
emc_table:
export:
...
extensions:
- MyBundle:Table\Column:boolean.html.twig
MyBundle:Table\Column:boolean.html.twig
{% block boolean_widget %}
<i {{ block('attributes') }}></i>
{% endblock %}
services.yml
table.column.boolean:
class: MyBundle\Service\Table\Column\BooleanType
tags:
- { name: column.type, alias: boolean }
BooleanType.php
class BooleanType extends IconType
{
/**
* {@inheritdoc}
*/
public function buildView(
array &$view,
ColumnInterface $column,
array $data,
array $options
) {
parent::buildView($view, $column, $data, $options);
$view['icon'] = $options['value'] ? $options['icon_true'] : $options['icon_false'];
}
/**
* @param OptionsResolverInterface $resolver
*/
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
parent::setDefaultOptions($resolver);
$resolver->setDefaults([
'icon_true' => 'check',
'icon_false' => 'ban'
]);
$resolver->addAllowedTypes([
'icon_true' => 'string',
'icon_false' => 'string',
]);
}
/**
* {@inheritdoc}
*/
public function getName()
{
return 'boolean';
}
}
The table renders just fine. Except in the column with the boolean
type I get <i></i>
. What am I missing?
When I run the export as Excel option, a file is generated successfully. However, when I attempt to open the file in MS Excel for Mac (v15.16) I receive warnings about errors in the Workbook Setting, Worksheet Setting, and Style. I tried running an export from your sample table at table-bundle.com and ran into the same issue.
Attached is a screenshot of the file when I open it as text (the only option permitted by Excel).
Hello,
I have made a Subtable but the last sub on anypage of the Table not appear (in your example too)
Have you got a solution to fix that? Many thanks
It would be great to be able to dynamically configure some of the attributes of cell element based on the parameter using a callback:
$builder->add(
'foo',
'icon',
[
'params' => 'e.protected',
'attrs' => function ($param1) { return ['style' => true == $param1 ? 'color: red' : 'color: blue';] }
]
);
Or maybe I just need support for a row-wide callback in which I can leverage the $id
of the cell to apply some logic.
Hello I have a problem, I have a Table and I would like an icon like that
$builder->add('delete', 'button', array(
'anchor_route' => 'show_spectators_delete',
'params' => array('id' => 's.id'),
'icon' => 'remove',
//'attrs' => array('class' => 'btn-xs')
));
But I have this error :
*The option "anchor_route" with value "show_spectators_delete" is expected to be of type "null", but is of type "string". * What I m doing wrong?
Thank you
DateTime column type requires the value to not be null in order to apply the formatter. Perhaps we can add a check to only apply the formatter if the value is not null?
Currently, it appears that the pages and the limit dropdown only properly function if they are children of a table row and cell. I have tried moving those components to other locations and their functionality is disabled once moved outside of the row.
I am using a custom render template and have tried moving the block('pages')
and block('limit_select')
to other locations on the template. Whenever I move them outside of their parent tr
they cease to function. Obviously I could update the js, but I was wondering if, perhaps, it would be worth considering to decouple the logic of these components from a row element.
I believe the culprits are line 91 and 96.
The drop down menu from the Export link is left-justified and being clipped off the screen if the table is drawn to "edge" of the screen. In the attached screenshot, I use Bootstrap3 "container-fluid" to house the table. As you can see, the menu is clipped off by the window of the browser. Since the button is right-aligned on the table, maybe we can right-align the drop down menu to prevent it from being clipped off.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.