Hi,
I’m using AG-Grid through dash to create some grids with the purpose of automating calculations. For these grids to be easier for users to utilise, I need to add some custom options for certain cells in a column. These options cant be general for all cells within a column and will depend on a value in a different column.
I’ve identified an example in AG-Grid documentation which is exactly what I’m after but I am having trouble turning their JS code into something that dash ag grid can read and execute.
The code is as follows;
cellEditorSelector: params => {
if (params.data.type === ‘age’) {
return {
component: NumericCellEditor,
}
}
if (params.data.type === ‘gender’) {
return {
component: ‘agRichSelectCellEditor’,
params: {
values: [‘Male’, ‘Female’]
}
}
}
if (params.data.type === ‘mood’) {
return {
component: MoodEditor,
popup: true,
popupPosition: ‘under’
}
}
return undefined
}
I’ve also attached an image of the code.
Could anyone please help me in modifying the code for it to work in dash ag grid.
Thanks again