From d79ef6767dcc63f75f17cfeaeeee7115824c96a7 Mon Sep 17 00:00:00 2001 From: tugcekucukoglu Date: Mon, 18 Mar 2024 13:02:20 +0300 Subject: [PATCH] Refactor #5426 - For Listbox --- components/lib/listbox/Listbox.d.ts | 22 +++++++++++++++++--- components/lib/listbox/Listbox.vue | 11 +++++++--- components/lib/listbox/style/ListboxStyle.js | 4 ++-- 3 files changed, 29 insertions(+), 8 deletions(-) diff --git a/components/lib/listbox/Listbox.d.ts b/components/lib/listbox/Listbox.d.ts index 405c47f81..10cfafe7c 100755 --- a/components/lib/listbox/Listbox.d.ts +++ b/components/lib/listbox/Listbox.d.ts @@ -9,8 +9,9 @@ */ import { InputHTMLAttributes, VNode } from 'vue'; import { ComponentHooks } from '../basecomponent'; +import { InputTextPassThroughOptions } from '../inputtext'; import { PassThroughOptions } from '../passthrough'; -import { ClassComponent, GlobalComponentConstructor, PassThrough, HintedString } from '../ts-helpers'; +import { ClassComponent, GlobalComponentConstructor, HintedString, PassThrough } from '../ts-helpers'; import { VirtualScrollerItemOptions, VirtualScrollerPassThroughOptionType, VirtualScrollerProps } from '../virtualscroller'; export declare type ListboxPassThroughOptionType = ListboxPassThroughAttributes | ((options: ListboxPassThroughMethodOptions) => ListboxPassThroughAttributes | string) | string | null | undefined; @@ -49,6 +50,20 @@ export interface ListboxPassThroughMethodOptions { global: object | undefined; } +/** + * Custom shared passthrough(pt) option method. + */ +export interface ListboxSharedPassThroughMethodOptions { + /** + * Defines valid properties. + */ + props: ListboxProps; + /** + * Defines current inline state. + */ + state: ListboxState; +} + /** * Custom change event. * @see {@link ListboxEmits.change} @@ -97,9 +112,10 @@ export interface ListboxPassThroughOptions { */ filterContainer?: ListboxPassThroughOptionType; /** - * Used to pass attributes to the filter input's DOM element. + * Used to pass attributes to the InputText component. + * @see {@link InputTextPassThroughOptions} */ - filterInput?: ListboxPassThroughOptionType; + filterInput?: InputTextPassThroughOptions; /** * Used to pass attributes to the filter icon's DOM element. */ diff --git a/components/lib/listbox/Listbox.vue b/components/lib/listbox/Listbox.vue index 97b62dc2a..c24c17c08 100755 --- a/components/lib/listbox/Listbox.vue +++ b/components/lib/listbox/Listbox.vue @@ -14,21 +14,24 @@
- @@ -124,6 +127,7 @@