Skip to content

Commit 83eb019

Browse files
authored
fix: can search disabled item (#535)
1 parent a2d7452 commit 83eb019

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/utils/valueUtil.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ function getFilterFunction(optionFilterProp: string) {
180180
// Option value search
181181
const rawValue = option[optionFilterProp];
182182
const value = toRawString(rawValue).toLowerCase();
183-
return value.includes(lowerSearchText) && !option.disabled;
183+
return value.includes(lowerSearchText);
184184
};
185185
}
186186

tests/Select.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -840,7 +840,7 @@ describe('Select.Basic', () => {
840840
);
841841

842842
wrapper.find('input').simulate('change', { target: { value: '1' } });
843-
expect(wrapper.find('List').props().data).toHaveLength(2);
843+
expect(wrapper.find('List').props().data).toHaveLength(3);
844844
});
845845

846846
it('should include disabled item in options', () => {

0 commit comments

Comments
 (0)