mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 17:02:38 +00:00
Add 'filter'-event to Tree.vue
This commit is contained in:
parent
1100647eee
commit
2603b7a140
3 changed files with 38 additions and 4 deletions
|
@ -47,7 +47,7 @@ import TreeNode from './TreeNode.vue';
|
|||
export default {
|
||||
name: 'Tree',
|
||||
extends: BaseTree,
|
||||
emits: ['node-expand', 'node-collapse', 'update:expandedKeys', 'update:selectionKeys', 'node-select', 'node-unselect'],
|
||||
emits: ['node-expand', 'node-collapse', 'update:expandedKeys', 'update:selectionKeys', 'node-select', 'node-unselect', 'filter'],
|
||||
data() {
|
||||
return {
|
||||
d_expandedKeys: this.expandedKeys || {},
|
||||
|
@ -166,6 +166,8 @@ export default {
|
|||
if (event.code === 'Enter') {
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
this.$emit('filter', { originalEvent: event, value: event.target.value });
|
||||
},
|
||||
findFilteredNodes(node, paramsWithoutNode) {
|
||||
if (node) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue