react-component / react-component/select
when custom define Cascader children ,it occur createElement error
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 938
- Forks
- 482
- Avg merge
- 15h 8m
- Merged PRs (30d)
- 2
Description
https://github.com/react-component/select/blob/fe1a13a6ccb9551e17fe7c8ea282bf5df907041d/src/BaseSelect.tsx#L348
In code, it use customizeRawInputElement.props.ref, but in line 794, it assignments to self by cloneElement.
when i used, children is a ReactNode, it warn i should use forwardRef.when i use it, it occured createElement error.
{customizeRawInputElement ? (
React.cloneElement(customizeRawInputElement, {
ref: customizeRawInputRef,
})
) :<Selector>
why it write this
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
Start at src/BaseSelect.tsx lines 348 and 794, then reproduce the custom children case described in the issue with the React ref warning and createElement error. Compare the ref access with the React.cloneElement call; done means the failure is explained and the custom raw input path has verified compatible behavior or a documented limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100