->filterable() and filters doesn't work for null #4334
Unanswered
ziming
asked this question in
Ideas & Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
sometimes the value of a Boolean field, BelongsTo or Select Field is null
Calling ->filterable() did not reveal that null choice. Hence it is a bug.
While when it comes to building manual filter, one has to do some trickery since array keys cannot be null. Like giving a choice with a key that has a string name or empty string then have a if statement to check it and apply null.
It will be great if it work seamlessly if I just specify ->nullable() or ->rules(['nullable'])
Beta Was this translation helpful? Give feedback.
All reactions