diff --git a/components/lib/tree/Tree.spec.js b/components/lib/tree/Tree.spec.js
index 2e685e9fe..e9cacca40 100644
--- a/components/lib/tree/Tree.spec.js
+++ b/components/lib/tree/Tree.spec.js
@@ -55,12 +55,12 @@ describe('Tree.vue', () => {
expect(wrapper.emitted('filter')).toBeTruthy();
});
- it('should render icon', ({expect})=>{
+ it('should render icon', ({ expect }) => {
expect(wrapper.find('span.pi-inbox').exists()).toBeTruthy();
- expect(wrapper.find('span.pi-inbox').classes('p-treenode-icon')).toBeTruthy()
- })
+ expect(wrapper.find('span.pi-inbox').classes('p-treenode-icon')).toBeTruthy();
+ });
- it('should render icon slot', ({expect})=>{
+ it('should render icon slot', ({ expect }) => {
let wrapper = mount(Tree, {
slots: {
nodeIcon: ``
@@ -80,5 +80,5 @@ describe('Tree.vue', () => {
const nodeIcon = wrapper.find('i[data-node-icon]');
expect(nodeIcon.exists()).toBeTruthy();
- })
+ });
});
diff --git a/components/lib/tree/TreeNode.vue b/components/lib/tree/TreeNode.vue
index 11bacc5e0..2c951d24d 100755
--- a/components/lib/tree/TreeNode.vue
+++ b/components/lib/tree/TreeNode.vue
@@ -33,10 +33,10 @@
-
+
-
+
diff --git a/doc/common/apidoc/index.json b/doc/common/apidoc/index.json
index 585b028df..c7cee3d8a 100644
--- a/doc/common/apidoc/index.json
+++ b/doc/common/apidoc/index.json
@@ -57309,6 +57309,19 @@
"returnType": "VNode[]",
"description": "Custom toggler icon template."
},
+ {
+ "name": "nodeIcon",
+ "parameters": [
+ {
+ "name": "scope",
+ "optional": false,
+ "type": "{\n \t node: TreeNode, // Tree node instance\n }",
+ "description": "togglericon slot's params."
+ }
+ ],
+ "returnType": "VNode[]",
+ "description": "Custom node icon template."
+ },
{
"name": "checkboxicon",
"parameters": [