From 0b5ac272efd129edcd3dd70d19b5eece3b672fd2 Mon Sep 17 00:00:00 2001 From: tugcekucukoglu Date: Tue, 26 Mar 2024 17:21:39 +0300 Subject: [PATCH] Refactor #5437 - For scrollHeight --- components/lib/autocomplete/AutoComplete.d.ts | 2 +- components/lib/autocomplete/BaseAutoComplete.vue | 2 +- components/lib/dropdown/BaseDropdown.vue | 2 +- components/lib/dropdown/Dropdown.d.ts | 2 +- components/lib/listbox/BaseListbox.vue | 4 ++++ components/lib/listbox/Listbox.d.ts | 5 +++++ components/lib/listbox/Listbox.vue | 4 ++-- components/lib/multiselect/BaseMultiSelect.vue | 2 +- components/lib/multiselect/MultiSelect.d.ts | 2 +- components/lib/orderlist/BaseOrderList.vue | 4 ++++ components/lib/orderlist/OrderList.d.ts | 5 +++++ components/lib/orderlist/OrderList.vue | 1 + components/lib/picklist/BasePickList.vue | 4 ++++ components/lib/picklist/PickList.d.ts | 5 +++++ components/lib/picklist/PickList.vue | 2 ++ components/lib/treeselect/BaseTreeSelect.vue | 2 +- components/lib/treeselect/TreeSelect.d.ts | 4 ++-- 17 files changed, 41 insertions(+), 11 deletions(-) diff --git a/components/lib/autocomplete/AutoComplete.d.ts b/components/lib/autocomplete/AutoComplete.d.ts index e2c9dabeb..ab70814cf 100755 --- a/components/lib/autocomplete/AutoComplete.d.ts +++ b/components/lib/autocomplete/AutoComplete.d.ts @@ -322,7 +322,7 @@ export interface AutoCompleteProps { optionGroupChildren?: string | ((data: any) => any[]) | undefined; /** * Maximum height of the suggestions panel. - * @defaultValue 200px + * @defaultValue 14rem */ scrollHeight?: string | undefined; /** diff --git a/components/lib/autocomplete/BaseAutoComplete.vue b/components/lib/autocomplete/BaseAutoComplete.vue index fd2d60999..1c653e462 100644 --- a/components/lib/autocomplete/BaseAutoComplete.vue +++ b/components/lib/autocomplete/BaseAutoComplete.vue @@ -22,7 +22,7 @@ export default { optionGroupChildren: null, scrollHeight: { type: String, - default: '200px' + default: '14rem' }, dropdown: { type: Boolean, diff --git a/components/lib/dropdown/BaseDropdown.vue b/components/lib/dropdown/BaseDropdown.vue index 0b59278c1..beb515f91 100644 --- a/components/lib/dropdown/BaseDropdown.vue +++ b/components/lib/dropdown/BaseDropdown.vue @@ -15,7 +15,7 @@ export default { optionGroupChildren: [String, Function], scrollHeight: { type: String, - default: '200px' + default: '14rem' }, filter: Boolean, filterPlaceholder: String, diff --git a/components/lib/dropdown/Dropdown.d.ts b/components/lib/dropdown/Dropdown.d.ts index 75b742d7f..0de74c673 100755 --- a/components/lib/dropdown/Dropdown.d.ts +++ b/components/lib/dropdown/Dropdown.d.ts @@ -302,7 +302,7 @@ export interface DropdownProps { optionGroupChildren?: string | ((data: any) => any[]) | undefined; /** * Height of the viewport, a scrollbar is defined if height of list exceeds this value. - * @defaultValue 200px + * @defaultValue 14rem */ scrollHeight?: string | undefined; /** diff --git a/components/lib/listbox/BaseListbox.vue b/components/lib/listbox/BaseListbox.vue index 938966729..7ddf95604 100644 --- a/components/lib/listbox/BaseListbox.vue +++ b/components/lib/listbox/BaseListbox.vue @@ -14,6 +14,10 @@ export default { optionGroupLabel: null, optionGroupChildren: null, listStyle: null, + scrollHeight: { + type: String, + default: '14rem' + }, invalid: { type: Boolean, default: false diff --git a/components/lib/listbox/Listbox.d.ts b/components/lib/listbox/Listbox.d.ts index 6bd88800d..8fb241a9e 100755 --- a/components/lib/listbox/Listbox.d.ts +++ b/components/lib/listbox/Listbox.d.ts @@ -271,6 +271,11 @@ export interface ListboxProps { * Inline style of inner list element. */ listStyle?: string | undefined; + /** + * Height of the viewport, a scrollbar is defined if height of list exceeds this value. + * @defaultValue 14rem + */ + scrollHeight?: string | undefined; /** * When present, it specifies that the component should have invalid state style. * @defaultValue false diff --git a/components/lib/listbox/Listbox.vue b/components/lib/listbox/Listbox.vue index 0ddc11d9b..8d9efbd82 100755 --- a/components/lib/listbox/Listbox.vue +++ b/components/lib/listbox/Listbox.vue @@ -43,8 +43,8 @@ {{ filterResultMessageText }} -
- +
+