i would like to set the values used for selecting a column value using agRichSelectCellEditor to data fetched from an api call.
If i set the value to const value, it works, but when i use
values fetched per api call using useState and useEffect it does not work
const [data, setData]=useState<string>([])
cellEditor: "agRichSelectCellEditor",
singleClickEdit : true,
editable: true,
cellEditorParams: {
values: ['English', 'Spanish', 'French', 'Portuguese', '(other)'], <== this works
}
cellEditor: "agRichSelectCellEditor",
singleClickEdit : true,
editable: true,
cellEditorParams: {
values: data, <== this does not works
}