I'm trying to create a custom column and set a custom sorter, but it seems like it doesn't work.
If I retrieve the column from the ColumnStore the sortable property = {} (just an empty object).
What does seem to work is setting "sortable" to undefined and then setting my custom sorter.
I can't seem this get this working in an example so I hope this is enough info.
Btw setting filterable config option via static defaults getter does work properly.
class CustomColumn extends Column {
static get type() {
return 'custom';
}
// does not work
static get defaults() {
return {
sortable: () => {
console.log('test');
}
};
}
public construct(config) {
// does not work
config.sortable = () => {
console.log('test');
};
super.construct(...arguments);
this.sortable = undefined;
// works due to line above
this.sortable = () => {
console.log('test');
};
}
}
ColumnStore.registerColumnType(CustomColumn);