mirror of
https://github.com/windmill-labs/windmill.git
synced 2026-08-19 00:02:03 +00:00
AgGrid - Allow to de-select all rows with setSelectedIndex (#3760)
* AgGrid - Allow to de-select all rows with setSelectedIndex * Update frontend/src/lib/components/apps/components/display/table/AppAggridTable.svelte Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com> * Else & check for null instead of -1 --------- Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
This commit is contained in:
@@ -304,7 +304,13 @@
|
||||
$componentControl[id] = {
|
||||
agGrid: { api: e.api, columnApi: e.columnApi },
|
||||
setSelectedIndex: (index) => {
|
||||
e.api.getRowNode(index.toString())?.setSelected(true)
|
||||
if(index === null) {
|
||||
e.api.deselectAll();
|
||||
outputs?.selectedRow?.set({})
|
||||
outputs?.selectedRowIndex.set(0)
|
||||
} else {
|
||||
e.api.getRowNode(index.toString())?.setSelected(true)
|
||||
}
|
||||
}
|
||||
}
|
||||
api = e.api
|
||||
|
||||
Reference in New Issue
Block a user