Open mkleinbort-ic opened 8 months ago
Have you managed to resolve this? I'm in need of a similar solution
No; you can fake this for a while by nesting the data you need within the cell's value, but I've not figured out how to call python code from within the JS.
I imagine you could set up a FastAPI server to handle this - but I've not tried.
I see, have you got an example of this method that I could refer to for implementation? would appreciate a lot since there aren't a lot of python x ag-grid on the web...
nvm, I was able to figure the workaround out. Leaving snippet here for anyone else who ends up in this thread looking for the same sol'n:
GET_DETAIL_ROW_DATA = '''function (params) {params.successCallback(params.data.cities)}''' master_grid_options = {..., 'detailCellRendererParams' : { 'getDetailRowData' : GET_DETAIL_ROW_DATA }, ...} master_grid = Grid(grid_data=rowData, grid_options=master_grid_options)
where 'rowData' is the input data in the example code snippet of Dash's AG-Grid page https://dash.plotly.com/dash-ag-grid/enterprise-master-detail.
Conceptual question - mainly geared towards the master-detail feature in AgGrid.
Can the
getDetailRowData
parameter as seen hereCall a function in python to return the json for display?
Currently I am wrapping the detail data as a json - but it's a lot of data to have loaded into memory all at once.
The ideal would be something like: