In an app, in a table, if a button is clicked, a way to get thisRow(field) pass into inline script
It would be great if - In an app, in a table, if a button is clicked, a way to get thisRow(field) pass into inline script. For example if I click data in row 1, getting the id field of row 1 to pass into the inline script that is associated with the action button in that table's row. Currently I can reference the results in a Runnable's JSON results for example but I can't seem to find a dynamic way to interact with which row was clicked in the frontend.
3 Replies
The closest thing I could find was selectedRow (object) from https://www.windmill.dev/docs/apps/app_configuration_settings/table#table-input
But I'm not sure how to reference that as part of runnable inputs, so that my button's inline script will be fed the field from the table's clicked row.
Table | Windmill
The table component allows you to display a table.
I think I figured this out: I put this into runnable inputs: nameOfMyTable.selectedRow.id
Where id is whatever field name you need to pass in, from that table's row.
You can simply use the
row
in the eval