diff --git a/package.json b/package.json index a9bd3d3c..acffec77 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@grapoza/vue-tree", - "version": "5.1.0", + "version": "5.2.0", "description": "Tree components for Vue 3", "author": "Gregg Rapoza ", "license": "MIT", diff --git a/src/components/TreeView.vue b/src/components/TreeView.vue index f5163243..c7e659c7 100644 --- a/src/components/TreeView.vue +++ b/src/components/TreeView.vue @@ -28,7 +28,7 @@ @treeNodeAdd="(t, p)=>$emit(TreeEvent.Add, t, p)" @treeNodeDelete="handleChildDeletion" @treeNodeAriaFocusableChange="handleFocusableChange" - @treeNodeAriaRequestFirstFocus="focusFirst(model)" + @treeNodeAriaRequestFirstFocus="(keepCurrentDomFocus) => focusFirst(model, keepCurrentDomFocus)" @treeNodeAriaRequestLastFocus="focusLast(model)" @treeNodeAriaRequestPreviousFocus="(t) => focusPrevious(model, t)" @treeNodeAriaRequestNextFocus="(t, f) => focusNext(model, t, f)" @@ -55,13 +55,14 @@ `; + +Filtering.parameters = { + docs: { + source: { + code: docsSourceCode, + language: "html", + type: "auto", + }, + }, +}; \ No newline at end of file diff --git a/tests/data/node-generator.js b/tests/data/node-generator.js index 4b95dd6b..4f83fc23 100644 --- a/tests/data/node-generator.js +++ b/tests/data/node-generator.js @@ -22,7 +22,7 @@ import InputType from '../../src/enums/inputType'; * @param {Array} nodeSpec The node specification array. * @param {String} baseId The base string used in the node IDs. * @param {Function} addChildCallback A method that returns a Promise that resolves to the node data to add as a subnode. - * @param {Function} loadChildrenAsync A method tha treturns a Promise that resolves to child nodes to set as the children. + * @param {Function} loadChildrenAsync A method that returns a Promise that resolves to child nodes to set as the children. * @returns {TreeViewNode[]} The requested nodes */ export function generateNodes(nodeSpec, baseId = "", addChildCallback = null, loadChildrenAsync = null) { @@ -48,7 +48,8 @@ export function generateNodes(nodeSpec, baseId = "", addChildCallback = null, lo treeNodeSpec: { _: { state: { - areChildrenLoaded: loadChildrenAsync === null + areChildrenLoaded: loadChildrenAsync === null, + matchesFilter: true } }, childrenProperty: 'children',