Disabling Row Selection in Table Component?

Greetings, my Retool peeps. I did search for this on the forum, but got some answers that seem to be from an older version of the Table component.

  1. My goal:
    I'm using cloud-hosted Retool. I have a table component, which has multiple row selection as the default from the inspector. I would like to "lock" the rows selected via JavaScript in the Change event handler of another component on the page. For example, if the user selected rows 3, 5, and 8, I would like to disable the ability to change those selected rows, after the user chooses from another single-select component.

  2. Issue:
    I have tried table.setDisable(true), but that doesn't seem to work. The other suggestion was to use a local variable to store the row selection and force write those back, which seems a little clunky.

So, I'm just wondering if there is a cleaner way to do this.

Thank you.

Hi @MMax25,

Great question. I just did some experimenting with a table and it seems like this may be a limitation on the current table.

If you allow multiple rows of the table to be "selected" by another component (or by the user) the table will be in an active state and users will be able to click to change row selection.

If you disable row selection, user clicks won't change anything on the table. But at the same time, your select component won't be able to select rows either.

Could you give me more details about your use case? If you are looking to display row data once a user makes a click in a select component, there are likely some other component's that could be used to display the data.

I can also make a feature request for the ability to programmatically select rows in a table while having row click events disabled.