Closed checcoux closed 4 years ago
Is your autorizzato
field a Doctrine mapped field? For me it's working fine:
protected function configureDatagridFilters(DatagridMapper $datagridMapper)
{
$datagridMapper
->add('name')
->add('phone')
->add('default')
;
}
What query is being executed in the profiler?
Are you sure it is false and not “null” ?
Something like this happened to me a few days ago. The problem was that my values were NULL
, but no
danger label was being rendered. Which cause some confusion for me and for the users.
Maybe the filter should work with null? Or maybe the display could be different? Or maybe this is not needed at all since it is a problem with the developer code. In my quase it was a malformed query.
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
in the end i was expecting the no danger label rendered with NULL values. i was kinda confused, why is not possible to render the no danger label with NULL values? like @ejkun i like the idea of showing that label with NULL label; maybe if you want to show only no and not NULL you could write another filter
Environment
Sonata packages
Symfony packages
PHP version
Subject
Working with filters in the admin dasboard. I have a boolean value that is displayed correctly with a "yes" or "no" value in the list. If I create a filter with all of the "yes" values it works, while if I do the same but i filter with "no" values, it returns an empty set.
Steps to reproduce
my UserAdmin class
Expected results
It should display "no" values as it does with "yes" values.
Actual results
Does not display "no" values.
All of the users
"yes" users
"no" users