react-component / react-component/select
maxTagPlaceholder renders inside a predefined tag
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 938
- Forks
- 482
- Avg merge
- 15h 8m
- Merged PRs (30d)
- 2
Description
I would like to use maxTagCount and maxTagPlaceholder props to render selected values and if more then one then render a custom element
<Select
options={[
{ value: 'option1', label: <span>option1</span> },
{ value: 'option2', label: <span>option2</span> },
{ value: 'option3', label: <span>option3</span> },
{ value: 'option4', label: <span>option4</span> }
]}
mode='multiple'
maxTagCount={1}
maxTagPlaceholder={() => <div>something</div>}
I would like the <div>something</div> to be rendered without any tag which wrap it, whats happening it that <div>something</div> is rendered inside a tag
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 by reproducing the issue with a multiple Select using maxTagCount={1} and a custom maxTagPlaceholder. Trace the rendering path for the placeholder and predefined tags; done means the custom element renders without being wrapped in another tag, while normal selected values retain their expected rendering.
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
- Mostly clear
- Newbie friendliness
- 45/100