akbarpulatov / flutter_awesome_select

Forked from https://github.com/davigmacode/flutter_smart_select, updated legacy code, migrated to null safety and more. AwesomeSelect allows you to easily convert your usual form select or dropdown into dynamic page, popup dialog, or sliding bottom sheet with various choices input such as radio, checkbox, switch, chips, or even custom input. Supports single and multiple choice.
https://pub.dev/packages/awesome_select
MIT License
48 stars 56 forks source link

Chip delete is not working #17

Open Bockos opened 2 years ago

Bockos commented 2 years ago

Hi Akbar,

In multiple selection, the selected chips on the body have delete section. But not work even in your example. Could you check it please?

Bockos commented 2 years ago

Hi @vasilich6107 ,

Issue still remains. Please consider the picture below. The delete property in the "S2Tile.fromState > body" section is working but the selected property keep remaining in the screen. I mean it works in backend, but UI does not change. How can I fix that problem?

When I check your examples, it also occurs in there.

My delete code; chipOnDelete: (i) { setState(() => groupedBusinessListSelected .remove(state.selected!.choice![i].value));

image

akbarpulatov commented 2 years ago

Can you share your code fully?

Tristl commented 2 years ago

I have encountrered the same problem and have solved / bypassed it by adding:

state.selected?.choice?.removeAt(i); in the function for chipOnDelete

iqboladahamjonov commented 2 years ago

I have encountrered the same problem and have solved / bypassed it by adding:

state.selected?.choice?.removeAt(i); in the function for chipOnDelete

This is actaully right solution. The respective part in the example can be fixed with state.selected?.choice?.removeAt(i); instead of _cars?.remove(state.selected?.choice?[i].value);