Toggle Component Properties

I try to toggle the showAddRowButton of a Table (table 1), depending on the value of a Row in another Table (table2).

I guess I have to use the 'Row Click'- Event Handler on Table 2 in combination with a JS query - but how can I change the value of the table1.showAddRowButton via JS??

The docs says: Available properties for Table. You can write JavaScript almost anywhere in Retool to manipulate or read information about components. But as far as I can see, I'm missing an example of how to manipulate this property.

  1. on table1, go to the "Toolbar"-section, and find "Show add row button"
  2. click the little fx-icon
  3. input something like {{ ! }}

No manipulation in table 2 required :-).

1 Like

THanks, this solves definitely my problem and I will apply it! Do you also know if my suggestion could work out, it is possible to toggle a property from a JS Query?

Absolutely, then you need to use a temporary state :slight_smile: