Hello there,
Just to share, we added this script to an expand row event handler to automatically collapse the row previously expanded. This enables only one row to be expanded at one time. Not sure if it is the most efficient way, but it works for now.
table1.collapseRows({
mode:"key",
key: variable1.value
})
await variable1.setValue(table1.selectedRowKey);
UPDATE: There was an issue when users collapsed and expanded the same row, I added an "only run when"