简体   繁体   English

在 ag-grid 浮动过滤器中键入多个值

[英]Typing Multiple Values In ag-grid Floating Filter

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

Pressing buttons 'Age Between 25 and 30' or 'Ireland & UK' filters the grid for multiple values.按下按钮“年龄在 25 到 30 岁之间”或“爱尔兰和英国”过滤网格以获取多个值。

For example, pressing button 'Age Between 25 and 30' i can see in the header filter text:例如,按下按钮“年龄在 25 到 30 岁之间”,我可以在 header 过滤器文本中看到:

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.将网格过滤为仅上述 2 项运动,但同样不起作用。

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.如果浮动过滤器具有 a) 两个条件或 b) 零(自定义选项)或两个(“范围内”)值,则浮动过滤器是只读的。

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 文档中的更多内容

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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