Skip to content

Commit 4496d89

Browse files
committed
restored isInChildren
1 parent 3e1b205 commit 4496d89

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

modules/components/Field.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,12 @@ export default class Field extends Component {
5555
}
5656

5757
filterOption = (input, option) => {
58-
const { value, groupLabel } = option.props;
58+
const { value, groupLabel, children } = option.props;
59+
60+
let isInChildren = false;
61+
if (typeof children === 'string') {
62+
isInChildren = children.toLowerCase().indexOf(input.toLowerCase()) >= 0;
63+
}
5964

6065
let isInValue = false;
6166
if (typeof value === 'string') {
@@ -67,7 +72,7 @@ export default class Field extends Component {
6772
isInGroupLabel = groupLabel.toLowerCase().indexOf(input.toLowerCase()) >= 0;
6873
}
6974

70-
return isInValue || isInGroupLabel;
75+
return isInChildren || isInValue || isInGroupLabel;
7176
}
7277

7378
getFieldDisplayLabel(field, fieldKey) {

0 commit comments

Comments
 (0)