Migrate ExtJs TreeLoader to TreeStore. How to migrate "baseAttrs"?

37 Views Asked by At

I´ve the crazy task to migrate parts of a webproject from ExtJS3.4 to ExtJS6

I´ve struggeling to find the way to migrate "TreePanel". In general it works, but one option is "crazy".

in my code i have:

this.tree = new Ext.treeTreePanel({
...
  loader: new Ext.tree.TreeLoader({
    dataUrl: '/url/to/fetch',
    requestMethod: 'GET',
    baseAttrs: {
        listeners: this.getTreeNodeListeners(),
        reference: this,
        allowDrop: false,
        allowChildren: false,
        isTarget: false,
        iconCls: 'saved_search_config_icon',
        leaf: true
    }
  }),
...
});

I know, these "loader:" must be replaced with "store:" and the usage of a TreeStore, therefore i create:

var store = Ext.create('Ext.data.TreeStore', {
    proxy: {
        type: 'ajax',
        url: '/url/to/fetch'

    }
});

BUT

How to migrate the "baseAttrs" Section?

I´ve no idea - tryed a lot - but it´s not the result as before.

Any ideas/suggestions?

0

There are 0 best solutions below