Comments (8)
hi,
I have the same question, did you get any answer?
thanks
from datatablesbundle.
I needed to do the reverse way, so I injected some dumy js code inside:
array(
"renderif" => array("pending) == false; var dummy = function(){}; dummy("),
)
This is pretty dirty but at least it works.
You can try to play with some injected JavaScript expression as a workaround in the meanwhile.
from datatablesbundle.
I don't really understand what is in your array, can you explain it a little?
from datatablesbundle.
It just contains a value string for the row name every value of this array is passed to JavaScript, all of row name values must be true to make the button rendered.
For example, for a renderif = array("pending")
:
For "pending"
it will write in JS:
visibleFlag &= Boolean(row.pending);
For "pending) == false; var dummy = function(){}; dummy("
it will write in JS:
visibleFlag &= Boolean(row.pending) == false; var dummy = function(){}; dummy();
With this hack I can invert the visibleFlag condition by adding an additional condition by appending an extra == false
. The dummy is just a way to open again the closed )
after the column value.
In this example the string value adds add some more stuff to the visibleFlag by adding more code inside as a JS Injection. Note this is JavaScript, so you need to deal with dataTables JS documentation if you want to try something fun there until the bundle implements something better.
from datatablesbundle.
@celvin : The activated flag is a javascript or php variable? The function wich returns true or false .... javascript or php?
from datatablesbundle.
php
Steffen [email protected] wrote:
@celvin : The activated flag is a javascript or php variable? The function wich returns true or false .... javascript or php?
Reply to this email directly or view it on GitHub:
#68 (comment)
from datatablesbundle.
Renderif should be used as follows.
'role' => 'ROLE_USER',
'render_if' => array(
'id' => 1,
'username' => 'admin',
'enabled' => false,
// ...
)
from datatablesbundle.
Thank you stwe!
from datatablesbundle.
Related Issues (20)
- Basic sample configuration in Symfony5. Someone? HOT 3
- Custom DateTimePicker HOT 1
- Disable translation of selectFilter entries
- Showing all entries does not work HOT 2
- Edit inline selected value missing HOT 1
- Notice: Array to string conversion in search VirtualColumn HOT 4
- Calling setHint() on the Query
- Support for the v1.x HOT 4
- parent recursive
- SetMaxResult HOT 1
- Individual Filtering error HOT 1
- Array to string conversion in search VirtualColumn HOT 1
- Problem with dql, filter and global search
- Undefined constant Doctrine\DBAL\Types\Type::DATETIME HOT 4
- Bug on function getName() HOT 3
- Hidden DateTimeColumn is all empty when switched to visible until reload HOT 1
- Symfony 6.0 support HOT 3
- Search in translate value of VirtualColumn HOT 1
- Does MultiselectColumn require or use the Select extension? HOT 2
- Invalidate Result cache? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from datatablesbundle.