Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
4
rated 0 times [  8] [ 4]  / answers: 1 / hits: 5581  / 4 Years ago, tue, november 24, 2020, 12:00:00

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


More From » reactjs

 Answers
1

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


[#2238] Friday, November 20, 2020, 4 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
feliciarainak

Total Points: 104
Total Questions: 91
Total Answers: 83

Location: Greenland
Member since Thu, Oct 27, 2022
2 Years ago
feliciarainak questions
Fri, Dec 31, 21, 00:00, 2 Years ago
Mon, Aug 9, 21, 00:00, 3 Years ago
Tue, Aug 25, 20, 00:00, 4 Years ago
;