The more I look into it, the more I think the extended class just cannot work the way I migrated it from 2.5.7. I only provided a snippit here and the full version had extraItems and tabsConfig which were migrated according to the guide but the guide is about the taskEdit feature, not a TaskEditor class.
I have no idea how to use the editorClass configuration in 4.x.x
The matter is quite different than originally intended so tell me if I should start a new thread.
So editorClass` is then not necessary and could be deprecated due to it being redundant.
class MyTaskEditor extends TaskEditor {
static get type() {
return 'mytaskeditor';
}
static get defaultConfig() {
return {
autoClose: false,
}
}
}
// Registers "mytaskeditor" as a known *type*
MyTaskEditor.initClass();
// The above should really go in its own module.
// Then here, we just need to ensure its imported so
// that the `mytaskeditor` type is registered
new Gantt({
appendTo : 'container',
features : {
taskEdit : {
editorConfig : {
type : 'mytaskeditor',
...other configs...
}
}
},
// ...
});
OK, that's a bug. It should work. It is destroying the created editor on second time of calling getEditor because the type of the existing editor is not 'taskeditor'
I'll fix the issue. type in a widget configuration object should always work.