yii2-grid
yii2-grid copied to clipboard
BooleanColumn: if reset filter (set prompt value that is equal to empty string) - then value in dropdown will be automatically set to 0 (Inactive)
Prerequisites
- [x] I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
- [x] The issue still exists against the latest
master
branch of yii2-grid. - [x] This is not an usage question. I confirm having gone through and read the documentation and demos.
- [x] This is not a general programming / coding question. (Those should be directed to the webtips Q & A forum).
- [x] I have attempted to find the simplest possible steps to reproduce the issue.
- [ ] I have included a failing test as a pull request (Optional).
Steps to reproduce the issue
- Add BooleanColumn to the grid with default settings.
- Choose filter value "Active" (or "Inactive", it doesn't matter).
- Reset filter value (by choosing prompt value).
Expected behavior and actual behavior
When I follow those steps, I see that filter value has been automatically set to "Inactive".
I was expecting that filter value will be set to "" (prompt).
Environment
PHP 7.3 (I have a feeling that this error is because of PHP version, because on your DEMO page it's okay) Yii 2.0.46
Browsers
- [x] Google Chrome
- [x] Mozilla Firefox
- [ ] Internet Explorer
- [x] Safari
Operating System
- [ ] Windows
- [x] Mac OS X
- [ ] Linux
- [ ] Mobile
Libraries
- jQuery version: 2.2.4
- yii2-grid version: 3.5.0
Isolating the problem
- [ ] This bug happens on the demos page
- [x] The bug happens consistently across all tested browsers
- [x] This bug happens when using yii2-grid without other plugins.