Hi all,
is it possible to set different values for select cell editor with a custom function?
I tried testing with these parameters with no success (I am getting AG Grid: no values found for select cellEditor
):
{
"cellEditor": "agSelectCellEditor",
"cellEditorParams": {"function": '{"values": [params.data.status]}'},
}
This happens even when testing with a static list without the use of params
.
dash==2.18.2
dash-ag-grid==31.3.0
Thanks.
Hello @valsorim,
Yes, if you want to use it similar to the above, you need to declare the response back in your dagfunc
namespace.
customEditorParams = (params) => {
return { value: [params.data.status]}
}
Something like the above should get you the expected result.
Thank you, @jinnyzor. That works.
Final solution:
dashAgGridFunctions.js
var dagfuncs = window.dashAgGridFunctions = window.dashAgGridFunctions || {};
dagfuncs.customEditorParams = function (params) {
return { values: [params.data.status]}
}
in column def:
{
"cellEditor": "agSelectCellEditor",
"cellEditorParams": {"function": "customEditorParams(params)"},
}
1 Like