No need for javascript or other components. You can do everything with nocode in weweb.
You just need to create a variable that stores the selection and add some workflows to update the variable when you change the value of the checkboxes.
A basic example:
-
create a variable of type array, for this example we call it “selected”
-
add a collection list element and bind the collection, in this example is a product table from Xano and assumes that you have an unique id for every row
-
bind the text to the name of the product and add a checkbox
-
bind the initial value of the checkbox to a formula that checks if the id of the item is in the “selected” array
-
add a workflow for the “on change” event of the checkbox
-
because the value of the event will be either
true
orfalse
add a “true/false split”
-
if
true
change the variable value inserting the id at the end
-
if
false
remove the id from the array
-
you can “deselect all” by simply updating the variable to an empty array
-
you can “select all” by simply updating the variable to an array with all the ids of the collection
the end result is this: