react-component / react-component/select
[ Enhancement ] Change optionFilterProp to accept an array of strings
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 938
- Forks
- 482
- Avg merge
- 15h 8m
- Merged PRs (30d)
- 2
Description
Hi All,
I wanted to suggest changing the optionsFilterProp from accepting a string prop to accepting an array of strings. This will do two things:
- Allow users to filter on multiple props using the search value without having to specify a custom filterOption
- When specifying a custom filter option for filtering based on two different props and passing in OptGroups as the children, we can only filter down to OptGroup since filtering only returns the OptGroups. While passing in true to FilterOption and using OptGroups allows the user to filter down to the individual group and then to the individual option.
However the user can't use the default filtering function since they want to filter based on two props.
I was trying to make this change myself and submit a pull request, but I can't get the rc-tools to find my jest-cli to test out the unit tests.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the optionFilterProp handling and the existing filtering tests, then investigate the rc-tools setup and why jest-cli is not found. Confirm how OptGroups and individual options are filtered today. Done means accepting an array of strings for multiple properties while preserving the existing string behavior and covering both default filtering and OptGroup cases with tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100