Skip to content

Auto-include filterable columns in GridFilterModel fieldSpecs - #4756

Merged
lbwexler merged 6 commits into
developfrom
gridFilterAutoFieldSpecs
Oct 2, 2026
Merged

lbwexler merged 6 commits into
developfrom
gridFilterAutoFieldSpecs

Conversation

@amcclain

@amcclain amcclain commented Oct 1, 2026

Copy link
Copy Markdown
Member

Resolves #3429.

Passing fieldSpecs to GridFilterModel was all-or-nothing. A spec for one field, e.g. to set a custom values renderer, left every other filterable column without a filter.

  • GridFilterModel now adds a default spec for every filterable column that fieldSpecs omits, if its field exists in the bound Store or View.
  • A reaction on gridModel.columns and bind.fieldNames keeps specs in place for columns added via setColumns() and for View query changes.
  • Configured specs and fieldSpecDefaults apply as before. Grids with no fieldSpecs are unchanged.
  • Updated fieldSpecs doc comment, grid README, and CHANGELOG.

Breaking change (LOW): apps that used fieldSpecs as an allow-list alongside colDefaults: {filterable: true} will now see filters on the omitted columns. Set filterable: false on those columns to keep the old behavior.

Tested in Toolbox admin column filter test pages (Store and Cube View binds), plus setColumns() and destroy checks from the console.


  • Caught up with develop branch as of last change.
  • Added CHANGELOG entry, or determined not required.
  • Reviewed for breaking changes, added breaking-change label + CHANGELOG if so.
  • Updated doc comments / prop-types, or determined not required.
  • Reviewed and tested on Mobile, or determined not required. (Column filters are desktop only.)
  • Created Toolbox branch / PR, or determined not required.

GridFilterModelConfig.fieldSpecs was all-or-nothing: providing a spec for any field disabled filters on all other filterable columns. GridFilterModel now creates a default spec for every filterable column not covered by the configured specs, including columns added later via setColumns().

Resolves #3429
- Also track bind.fieldNames so View query changes add specs for matching filterable columns.
- Add brief description to CHANGELOG difficulty header and shorten entry.
- Note in grid README that the column's field must exist in the bound Store or View.
@lbwexler
lbwexler self-requested a review October 1, 2026 17:12

@lbwexler lbwexler left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved -- waiting to merge until we aready to release the next major version

@amcclain

amcclain commented Oct 1, 2026

Copy link
Copy Markdown
Member Author

Agreed - thanks!

@lbwexler
lbwexler merged commit 84f9ef8 into develop Oct 2, 2026
3 checks passed
@lbwexler
lbwexler deleted the gridFilterAutoFieldSpecs branch October 2, 2026 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Specifying config for any field within GridFilterModelConfig.fieldSpecs requires all filterable cols to be spec'd

2 participants