You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've encountered a problem with updating the UI with the changes in List. I know that the value (in my case the List) selected by the Selector must be overwritten by another value, in order to trigger a change between previous and next
So when adding items to the list, instead of this: options.add(optionModel);
I used this: options = [...options, optionModel];
And in that case, it works
But, when modyfing the entries from the list, like this: options[optionIndex].frequencyPreset = preset; options = [...options];
Or removing using this: options = options..removeAt(index);
The values from the previous and next are the same, so the Selector does not see the changes, that were made in the List
Could someone help me out with this?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I've encountered a problem with updating the UI with the changes in List. I know that the value (in my case the List) selected by the Selector must be overwritten by another value, in order to trigger a change between previous and next
So when adding items to the list, instead of this:
options.add(optionModel);
I used this:
options = [...options, optionModel];
And in that case, it works
But, when modyfing the entries from the list, like this:
options[optionIndex].frequencyPreset = preset; options = [...options];
Or removing using this:
options = options..removeAt(index);
The values from the previous and next are the same, so the Selector does not see the changes, that were made in the List
Could someone help me out with this?
Beta Was this translation helpful? Give feedback.
All reactions