Search code examples
google-apps-scriptgmail-addons

SelectionInput Checkbox change value programmatically


I have a list of items with checkbox and there is one checkbox at the end labelled "Select All". I would like to check all the items when the user checks the "Select All" checkbox, or maybe even clicking a button. Is there a way to do this or this is not possible?


Solution

  • It’s not possible unfortunately. All the code you write is run server side, therefore there is no client side code to update your UI. The only way to change content on a card is to replace the card with a new card. You could simulate this action by returning a sort of cloned card with the change that you want to happen, but because it will return from the server, it won’t be as seamless as you would like. I hope that helps.