react-datatable icon indicating copy to clipboard operation
react-datatable copied to clipboard

Implement Common Cell Editors

Open wmira opened this issue 11 years ago • 2 comments

We should be able to implement this cleanly with the new datasource implementation

  1. An Up/Down value editor. If its a number then this up/down toggle can increment and decrement the value
  2. A Select/Key Value editor.
  3. A Calendar Editor

wmira avatar Nov 21 '14 16:11 wmira

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
}

...

bebraw avatar Jan 17 '15 08:01 bebraw

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.

bebraw avatar Jan 17 '15 15:01 bebraw