react-component / react-component/select
Typescript definition problem in SelectProps.
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 938
- Forks
- 482
- Avg merge
- 15h 8m
- Merged PRs (30d)
- 2
Description
When allowClear was setted in a Select and user clicked Reset Button, Event onchange will be triggered. The typescript definition is wrong. Two parameters are undefined. It should be as below.
onChange?: (value?: T, option?: React.ReactElement<any> | React.ReactElement<any>[]) => void;
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
Read the linked lines in src/generate.tsx, focusing on the SelectProps onChange definition and the allowClear reset behavior. Update the type so both callback parameters are optional and accept the documented value and option forms; done means the definition matches the reported runtime arguments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100