Skip to content

Add support for ag grid 27.3.0 blank/notblank filter options#3

Open
AutoGibbon wants to merge 1 commit intoAdrianWilczynski:masterfrom
AutoGibbon:AddSupportForNativeBlanknotBlank
Open

Add support for ag grid 27.3.0 blank/notblank filter options#3
AutoGibbon wants to merge 1 commit intoAdrianWilczynski:masterfrom
AutoGibbon:AddSupportForNativeBlanknotBlank

Conversation

@AutoGibbon
Copy link

Add support for blank/notBlank filter options present in ag-grid v27.3.0

Merges behaviour with existing not/notnull options

@AdrianWilczynski
Copy link
Owner

Hi,
Thanks for the PR. I wasn't aware of blank/not blank filter options.

I didn't have a chance to test it yet, but I wonder if it shouldn't also check for empty/whitespace strings.

https://github.com/ag-grid/ag-grid/blob/0bc513e1df5d2c6a5441f631f29b44746712c1e0/community-modules/core/src/ts/filter/provided/text/textFilter.ts#L237

https://github.com/ag-grid/ag-grid/blob/0bc513e1df5d2c6a5441f631f29b44746712c1e0/community-modules/core/src/ts/filter/provided/simpleFilter.ts#L630

@AutoGibbon
Copy link
Author

To do that reliably you'd need to inspect the underlying type for the given property name in GetPredicate, since the blank filters can be applied to more than just strings.

I can take a look into this when I get some time - we have a hack in our project for now, replacing blank/notblank for the existing null/notnull filter types in a custom modelbinder.

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

Successfully merging this pull request may close these issues.

2 participants