diff --git a/components/lib/tree/Tree.spec.js b/components/lib/tree/Tree.spec.js index cb43cf553..702ecd6ad 100644 --- a/components/lib/tree/Tree.spec.js +++ b/components/lib/tree/Tree.spec.js @@ -44,8 +44,8 @@ describe('Tree.vue', () => { it('emits update:filterValue on filter input', async () => { wrapper = mount(Tree, { props: { - filter: true, - }, + filter: true + } }); let searchField = wrapper.find('input.p-tree-filter'); @@ -53,5 +53,5 @@ describe('Tree.vue', () => { await searchField.trigger('keydown.space'); expect(wrapper.emitted('filter')).toBeTruthy(); - }) + }); }); diff --git a/doc/common/apidoc/index.json b/doc/common/apidoc/index.json index 9486feb63..3e6917ead 100644 --- a/doc/common/apidoc/index.json +++ b/doc/common/apidoc/index.json @@ -52076,6 +52076,29 @@ ], "methods": [] }, + "TreeFilterEvent": { + "description": "Custom filter event.", + "relatedProp": "TreeEmits.filter", + "props": [ + { + "name": "originalEvent", + "optional": false, + "readonly": false, + "type": "Event", + "default": "", + "description": "Original event" + }, + { + "name": "value", + "optional": false, + "readonly": false, + "type": "string", + "default": "", + "description": "Filter value" + } + ], + "methods": [] + }, "TreePassThroughOptions": { "description": "Custom passthrough(pt) options.", "relatedProp": "TreeProps.pt", @@ -52578,9 +52601,10 @@ "name": "update:selectionKeys", "parameters": [ { - "name": "event", + "name": "value", "optional": false, - "type": "TreeSelectionKeys" + "type": "TreeSelectionKeys", + "description": "New selection keys." } ], "returnType": "void", @@ -52637,6 +52661,19 @@ ], "returnType": "void", "description": "Callback to invoke when a node is collapsed." + }, + { + "name": "filter", + "parameters": [ + { + "name": "event", + "optional": false, + "type": "TreeFilterEvent", + "description": "Custom filter event." + } + ], + "returnType": "void", + "description": "Callback to invoke on filter input." } ] }