caraiiwala
caraiiwala2w ago

AgGrid doesn't bubble `selectedRows` to parent Accordion List

I have a table nested in a dynamically sized accordion, and I have been fetching the selectedRow from each table through the accordion's inputs. When the tables are multiple selectable though, selectedRows does not show in the accordion's inputs. Can I access the selectedRows of every table without going through the accordion's inputs? I'm also just now noticing that the selectedRow for each table in accordion's inputs is not accurate either. Well at least my expectation is it would always indicate which is currently selected, not which was most recently selected (it doesn't adjust to deselection).
No description
3 Replies
caraiiwala
caraiiwalaOP2w ago
Is this at all possible with getAgGrid? I don't know if any of these frontend script helpers work well for lists though. The id is only l in my screenshot above. There is no l.0, l.1, etc.
caraiiwala
caraiiwalaOP2w ago
There is an onSelectedChanged attribute on the AgGrid component https://ag-grid.com/javascript-data-grid/row-selection-api-reference/#reference-selection-selectionChanged. My thought was as a workaround to manage the state of selected rows through this somehow. Don't know if that's even possible...
JavaScript Grid: Row Selection API Reference | AG Grid
Selection API Reference for Single and Multi-Row Selection in the JavaScript Table. Download AG Grid v33.2.4 today: The best JavaScript Table & JavaScript Data Grid in the world.
caraiiwala
caraiiwalaOP2w ago
Seems like I'll have to consider a different solution for now. I would have expected other properties to be available on the parent list though, not just selectedRow and selectedRowIndex Hmmm I'm having a similar problem now where the results of a MultiSelect in a List are not showing in the List's inputs...

Did you find this page helpful?