primefaces / primefaces/primereact
Chips: clearOnRejection option
Nobody has claimed this yet.
- Dominant language
- CSS
- Stars
- 8.3k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
Describe the feature you would like to see added
Currently, the Chips component clears the input every time the user attempts to add it.
This makes it hard to implement validation, for example when trying to restrict the chips to a list of (valid) email addresses.
Describe the solution you'd like
A clearOnRejection prop which, when set to false, would prevent the call to updateInput when allowAddition === false
Describe alternatives you have considered
A validate prop may be more generalisable
Contributor guide
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 locating the Chips component and tracing where input is cleared when allowAddition is false. Add the clearOnRejection behavior described in the issue, then verify that rejected input is retained when the option is false and existing clearing behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100