primereact icon indicating copy to clipboard operation
primereact copied to clipboard

Chips: clearOnRejection option

Open MajorPrime opened this issue 1 year ago • 0 comments

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

MajorPrime avatar Aug 10 '22 14:08 MajorPrime