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

BooleanColumn: if reset filter (set prompt value that is equal to empty string) - then value in dropdown will be automatically set to 0 (Inactive) #1046

Open
11 of 17 tasks
vadim-bulochnik opened this issue Oct 13, 2022 · 0 comments

Comments

@vadim-bulochnik
Copy link

Prerequisites

  • I have searched for similar issues in both open and closed tickets and cannot find a duplicate.
  • The issue still exists against the latest master branch of yii2-grid.
  • This is not an usage question. I confirm having gone through and read the documentation and demos.
  • This is not a general programming / coding question. (Those should be directed to the webtips Q & A forum).
  • 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

  1. Add BooleanColumn to the grid with default settings.
  2. Choose filter value "Active" (or "Inactive", it doesn't matter).
  3. 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

  • Google Chrome
  • Mozilla Firefox
  • Internet Explorer
  • Safari

Operating System

  • Windows
  • 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
  • The bug happens consistently across all tested browsers
  • This bug happens when using yii2-grid without other plugins.
@vadim-bulochnik vadim-bulochnik changed the title BooleanColumn: if applied filter with value "" (prompt) then value in dropdown will be automatically set to 0 (Inactive) BooleanColumn: if reset filter (set prompt value that is equal to empty string) - then value in dropdown will be automatically set to 0 (Inactive) Oct 14, 2022
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

1 participant