From 6ea5aba58f63e0f3edc956ecf21b888a176abd67 Mon Sep 17 00:00:00 2001 From: tugcekucukoglu Date: Fri, 22 Mar 2024 18:53:01 +0300 Subject: [PATCH] Refactor #5426 - For Tree --- components/lib/tree/Tree.d.ts | 18 +++++++++++++++++- components/lib/tree/Tree.vue | 10 ++++++---- components/lib/tree/style/TreeStyle.js | 2 +- 3 files changed, 24 insertions(+), 6 deletions(-) diff --git a/components/lib/tree/Tree.d.ts b/components/lib/tree/Tree.d.ts index a394dc2b13..bc189f94a2 100755 --- a/components/lib/tree/Tree.d.ts +++ b/components/lib/tree/Tree.d.ts @@ -9,6 +9,7 @@ */ import { VNode } from 'vue'; import { ComponentHooks } from '../basecomponent'; +import { InputTextPassThroughOptions } from '../inputtext'; import { PassThroughOptions } from '../passthrough'; import { TreeNode } from '../treenode'; import { ClassComponent, GlobalComponentConstructor, HintedString, PassThrough } from '../ts-helpers'; @@ -45,6 +46,20 @@ export interface TreePassThroughMethodOptions { global: object | undefined; } +/** + * Custom shared passthrough(pt) option method. + */ +export interface TreeSharedPassThroughMethodOptions { + /** + * Defines valid properties. + */ + props: TreeProps; + /** + * Defines current inline state. + */ + state: TreeState; +} + /** * Custom expanded keys metadata. */ @@ -95,8 +110,9 @@ export interface TreePassThroughOptions { filterContainer?: TreePassThroughOptionType; /** * Used to pass attributes to the input's DOM element. + * @see {@link InputTextPassThroughOptions} */ - input?: TreePassThroughOptionType; + input?: InputTextPassThroughOptions; /** * Used to pass attributes to the search icon's DOM element. */ diff --git a/components/lib/tree/Tree.vue b/components/lib/tree/Tree.vue index 62efd97a66..cd0ac805db 100755 --- a/components/lib/tree/Tree.vue +++ b/components/lib/tree/Tree.vue @@ -9,7 +9,7 @@
- + @@ -41,6 +41,7 @@ diff --git a/components/lib/tree/style/TreeStyle.js b/components/lib/tree/style/TreeStyle.js index c0ae59ea4b..90ee723511 100644 --- a/components/lib/tree/style/TreeStyle.js +++ b/components/lib/tree/style/TreeStyle.js @@ -12,7 +12,7 @@ const classes = { loadingOverlay: 'p-tree-loading-overlay p-component-overlay', loadingIcon: 'p-tree-loading-icon', filterContainer: 'p-tree-filter-container', - input: 'p-tree-filter p-component', + input: 'p-tree-filter', searchIcon: 'p-tree-filter-icon', wrapper: 'p-tree-wrapper', container: 'p-tree-container',