Hi, it's really not obvious from documentation how to make and use custom cell editors. Could you please help with that?
As I understood I have to create Field subclass for this. How then to set it as an editor for some field?
Or maybe it's possible to use editor function as well as we do with renderers?
export default class PercentColumn extends Column {
static get type() {
return 'percent';
}
// Type to use when auto adding field
static get fieldType() {
return 'number';
}
static get fields() {
return ['lowThreshold'];
}
static get defaults() {
return {
/**
* PercentColumn uses a {@link Core.widget.NumberField} configured with an allowed interval 0 - 100 as
* its default editor.
* @config {Object|String}
* @default Core.widget.NumberField
* @category Misc
*/
editor : {
type : 'number',
min : 0,
max : 100
}
...
}
}
Ok, so let's clarify by steps:
1) Make custom editor class by extending Field class
2) Set it in editor field in column config
Right?
Let's imagine my class is MyCustomField. Is it enough to put string myCustom into editor.type field? Or I need to make also custom Column class for this as in your example?