reactjsmaterial-uicomponentschips

How to customize Material UI Chip component to be editable and copy paste content (comma separated)


I have the requirement for create the input field which takes the numbers array(comma ','separated ) like [123,34,23,13].

I want when user copy this 123,34,23,13 into input field it should change in this below format based on comma.

enter image description here

Is there anyway to achieve this.

Later on I want to show the red flag also for incorrect number(which will be verify on submission of value).


Solution

  • This is I found till now : https://codesandbox.io/s/quirky-waterfall-5ebi3y?file=/src/Chips.jsx

    There is missing part when the API return the wrong/Invalid array of input then it should convert into red flag