Skip to content

Commit

Permalink
fix: can search disabled item (#535)
Browse files Browse the repository at this point in the history
  • Loading branch information
xrkffgg committed Aug 31, 2020
1 parent a2d7452 commit 83eb019
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/utils/valueUtil.ts
Expand Up @@ -180,7 +180,7 @@ function getFilterFunction(optionFilterProp: string) {
// Option value search
const rawValue = option[optionFilterProp];
const value = toRawString(rawValue).toLowerCase();
return value.includes(lowerSearchText) && !option.disabled;
return value.includes(lowerSearchText);
};
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Select.test.tsx
Expand Up @@ -840,7 +840,7 @@ describe('Select.Basic', () => {
);

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

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

1 comment on commit 83eb019

@vercel
Copy link

@vercel vercel bot commented on 83eb019 Aug 31, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.