EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: jega on November 02, 2025, 10:37:07 AM



Title: Auto Icons in tree/treegrid
Post by: jega on November 02, 2025, 10:37:07 AM
Hi.

Want to use the aicon on a tree/treegrid, as on buttons etc.

data.json
[
    {
        "id": 1,
        "text": "Text 1",
        "iconCls": "aicontest-testicon1",
        "children": [
            {
                "id": 2,
                "text": "Text",
                "iconCls": "aicontest-testicon2"
               }
        ]
    }
]

Then the treenodes just have the default icons

But if i create 2 buttons, they get the test1 and test2 icons

<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'aicontest-testicon1',width:80">Test1</a>
<a href="javascript:void(0)" class="easyui-linkbutton" data-options="iconCls:'aicontest-testicon2',width:80">Test2</a>


AND then the tree nodes also get the test1 and test2 icons. Like something not loading.


Need a quick fix if possible.

Regards Jesper