简体   繁体   中英

Typing Multiple Values In ag-grid Floating Filter

See plunker: https://plnkr.co/edit/JEJ4j3ANQe4ZCnXI

Pressing buttons 'Age Between 25 and 30' or 'Ireland & UK' filters the grid for multiple values.

For example, pressing button 'Age Between 25 and 30' i can see in the header filter text:

25-30

Is applied yet if i try to type this manually, it does not work.

Same for Sports column, i would have expected:

Rowing OR Fencing

to filter the grid to just the above 2 sports but again, doesnt work.

Update:

To replicate issue:

  1. Open link above
  2. Scroll right to display Sport column
  3. Type the following: 'Rowing OR Fencing'

Grid is now empty.

As per docs -

The floating filters for Text, Number and Date (the simple filters) are editable when the filter has one condition and one value. If the floating filter has a) two conditions or b) zero (custom option) or two ('In Range') values, the floating filter is read-only.

What this means is when you use floating filter to filter on column it will filter on one value only. If you want to add more than one filtering condition you will have to use the filter button that shows up a filtering menu.

Here is how your 'Rowing OR Fencing' is interpreted when entered in floating filter.

在此处输入图像描述

The correct way would be to open the filter menu and add multiple filter criteria instead of typing in floating filter. In this case floating filter becomes read only.

在此处输入图像描述

More in the docs

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM