I was hoping some example of how to use dropdown cell, because currently the select wont open if I click on it, It does not make sense for open/close behaviour be controlled from the outside. I am using this @silevis/reactgrid library to create my datasheet/spreadsheet
This is how I create my rows
const rows = useMemo<Row<DefaultCellTypes | AutocompleteCell>[]>(() => {
const headerRow: Row = {
rowId: "header",
cells: [
{ type: "header", text: "Display Name" },
{ type: "header", text: "Reports To" },
{ type: "header", text: "Job Title" }
]
};
return [
headerRow,
...members.map<Row[]>((member, idx) => ({
rowId: idx,
cells: [
{ type: "text", text: member.display_name || "-" },
{
type: "dropdown",
values: members
.filter(inner => inner.parent_id !== member.id)
.map(inner => ({ label: inner.display_name, value: inner.id })),
selectedValue: member.parent_id || "-"
},
{ type: "text", text: member.job_title || "-" }
]
}))
];
}, [members]);