[Bug report] tree folder type customization apply on all instances

Hi,
According the documentation https://docs.webix.com/datatree__node_templates.html#changingpredefinedtemplates

We can customize "folder" type of a tree or treetable to change/style icon. But there is a huge mistake with that method. Doing this will make de change applied on all tree / treetable instances as if we globally changing "folder" type behavior.

webix.ui({
  view: "treetable",
  columns: ...,
  data: ...,
  type: {
    folder: function (obj) {
      return "✔️";
    },
  },
});

Here snippet demonstrate the problem : https://snippet.webix.com/s3fn98p0

Nothing in the documentation make think that we should expect this behavior.

The best alternative I found is to use a custom name for the type and use common.my_custom_name instead of common.treetable in row template.

Tagged:

Comments

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion