Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter option "default_value" not working with boolean filters #251

Open
Geolim4 opened this issue May 6, 2022 · 3 comments
Open

Filter option "default_value" not working with boolean filters #251

Geolim4 opened this issue May 6, 2022 · 3 comments

Comments

@Geolim4
Copy link

Geolim4 commented May 6, 2022

Hello,

I have created a boolean filter on my project:

sylius_grid:
    grids:
        sylius_admin_promotion:
            filters:
                archived:
                    default_value: true 
                    type: boolean
                    label: "Archived"

And when I'm loading the "promotions" view the filter "Archived" is not assigned to "true" but "all".
Not even working with "1" instead of boolean.

Thanks !

@chrishelbert
Copy link

Hello

try with
default_value: 'true'

For me :
true => return false archived promotions
false => return all promotions
'true' => return true archived promotions

tell me if it works ;)

@LucaGallinari
Copy link

I confirm that @chrishelbert works

@Geolim4
Copy link
Author

Geolim4 commented Aug 2, 2022

Sorry for delay, I'll test that today ! Thank.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants