I have a list of country names (eg below)
I want the user to be able to either select a few countries or, select all countries except a few.
Now, this can be done using a select all button by selecting all items and then unchecking the ones that are not required. However, this creates a long query to be sent to the backend.
For example, if I want to select all countries except Argentina, the query would look something as follows:
select(Australia, Austria, Belgium...)
I want to transform this query to just
except(Argentina)
How do I display/convey the user that he/she can either select countries that he wants details about or countries that he doesn't want details about?
collectionModeExcept
; once the user hits Select All, internally change thecollectionModeExcept
totrue
, and start building a list with all unselected items as the user unselects a checkbox. This way, you won't need to send the full list of checkbox selections.