I open a modal with a list of checkboxes (all checked), uncheck some of them, then when I cancel the modal and reopen it again the checkboxes are unchecked even though I cancelled.
StackBlitz here.
I’m trying to use a list of checkboxes instead of a select component because I want a ‘Select all’ button.
I found this similar issue but it is unanswered.
I want to know why the selection is persisting? How do I get it to forget the selection when the modal is dismissed? (Unless the user selects Save, but I haven’t implemented that yet).
Fairly new to all this, so any help appreciated!