I have choice chips with these values. I have one use case where while making API calls i send these values in form of array of integers.
If i have selected - mon, tue, wed, thu, fri then i should store values in page state as [0,1,2,3,4] and using this array of integers i will make API call.
If i have selected - mon, tue, wed then values should be [0,1,2]
if i deselect some value then it should update the array also like in first case if i deselect fri then it should update array as [0,1,2,3]. Please help me in building this.
converting choice chips values
1
4 replies