I opened a topic in March and pointed out a bug in Webix 3.2.2 regarding DataTable that Listopad confirmed shortly after. I waited a bit and tried version 3.2.4 today and had to realise that the bug was still there.
As I really need this to work, I quickly wrote a patch for myself to use until the bug is officially fixed. Then I thought I’d maybe share my findings with the developers to make their lives easier.
The refreshColumn
method throws a TypeError.
if ((columns && columns != this.config.columns) || reset){
this._clear_hidden_state();
this._filter_elements = [];
// columns can be undefined at this point and columns.length will throw an error
this._rightSplit = columns.length - (this.config.rightSplit || 0);
}
The _generate_menu_columns
method also throws a TypeError.
// menu can be undefined at this point and menu.$blockRender will throw an error
if (menu.$blockRender || this._preconfigured_hmenu) return;
I don’t know whether this is useful in any way.
Hello and thank you for sharing your solution,
But we also didn’t forget about this issue. The fix will be available in a few hours as a part of the upcoming Webix 3.3 release.
No doubt you wouldn’t forget about the issue. I just thought that when I patch it myself I might as well share it. My timing seems to be quite bad, though. Anyway, as always, thanks for the reply.
I just thought that when I patch it myself I might as well share it.
Right you are.
By the way, I’ve checked your snippet from the previous topic and here’s a small improvement to make it work smoothly in 3.3. You need to clear the data before parsing the new config:
function loadA() {
$$("thetable").clearAll();
$$("thetable").parse({ /**/ });
}
I tried out Webix 3.3 today and noticed that I still get the TypeError in _generate_menu_columns. It occurs when I try to re-define()
the headermenu property of the table. Should it be possible to redefine the headermenu or is it not implemented yet?
I changed my code to not use define()
but $$(table.config.headermenu).parse()
and now it works fine. I even prefer this way over define()
. So, I guess my question doesn’t need an answer anymore.