0
votes

How to clear the mui-chips in Material UI Autocomplete TextField on changing the value in another field. In the below example, I am trying to clear subtype value whenever Type value is getting changed. I am able to update the drop-down options based on value changed in the Type field. But the mui chips are not getting cleared.

options for Banking Type

In the below screenshot, I am trying to clear the options and mui-chips for the subtype field. Only the Options are getting updated, but mui-chips are not getting cleared.

mui chips not gettig reset, on changing Type drop-down value

Issue reproducible in below codesandbox link: https://codesandbox.io/s/autocomplete-multiple-wkumx

1

1 Answers

0
votes

Got the answer from oliviertassinari from github.

Working solution is available at below link: https://codesandbox.io/s/autocomplete-multiple-forked-onu5n?file=/src/demo.js:0-2437