It is impossible to set values for grouped numeric filters with javascript enabled.
Steps to reproduce:
- Add a numeric field to user
- Edit the admin/people view
- Add a filter for the age field
- Expose it and group it.
The value, min and max fields are all hidden. What is supposed to happen is that either the value or the min max fields are supposed to appear depending on which operator you have selected.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 2356443.1.patch | 765 bytes | alexpott |
Comments
Comment #1
alexpottComment #2
alexpottComment #3
olli commentedNice! Without re-keying the array turns into constraint object in js, not an array of constraints.
Comment #4
Khetam commentedAwesome, after applied the patch array disappeared and everything is working fine.
Many thanks.
Khetam
Comment #5
dries commentedThis issue is a major bug and the change only impacts this one use of #states API, so it makes sense to allow this fix per #2350615: [policy, no patch] What changes can be accepted during the Drupal 8 beta phase?. Even though we don't have JS coverage, can we at least add test coverage that the PHP code is returning what is required for this functionality to work?
Comment #6
alexpottClosing in favour of #1985406: #states not supported for elements in formatter settings being displayed on Views field handler form which adds a helper method to tackle this problem with tests.