Open wmira opened 9 years ago
It would be handy if it was possible to customize this per column. Let's say you have a Country
column, in that case you would probably like to offer a country listing with countries to select from. Ideally you should be able to define custom editors through configuration like this:
config = {
style: 'pure',
cols: [
{
property: 'country', editable: true, header: 'Country', editor: countryEditor
}
]
};
...
function countryEditor() {
... // this would return JSX needed to edit a country, ie. a drop-down with countries
// and deal with the selection. you'll need to define some standard semantics for this
}
...
Another thought... What if you want to display a color at a cell? Just making it possible to define a custom editor wouldn't be enough. You would need to be able to customize the way the values are displayed.
I can open a separate issue for this if you want.
We should be able to implement this cleanly with the new datasource implementation