From e846c50124e719c02814109de9f3e4cd90005a7e Mon Sep 17 00:00:00 2001 From: Cagatay Civici Date: Thu, 30 May 2024 11:08:49 +0300 Subject: [PATCH] Fixed TreeSelect overflow issues --- components/lib/treeselect/BaseTreeSelect.vue | 2 +- components/lib/treeselect/TreeSelect.d.ts | 2 +- components/lib/treeselect/style/TreeSelectStyle.js | 5 +++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/components/lib/treeselect/BaseTreeSelect.vue b/components/lib/treeselect/BaseTreeSelect.vue index 75b7860a1..b8ae483dc 100644 --- a/components/lib/treeselect/BaseTreeSelect.vue +++ b/components/lib/treeselect/BaseTreeSelect.vue @@ -10,7 +10,7 @@ export default { options: Array, scrollHeight: { type: String, - default: '14rem' + default: '20rem' }, placeholder: { type: String, diff --git a/components/lib/treeselect/TreeSelect.d.ts b/components/lib/treeselect/TreeSelect.d.ts index 4f71a7ee6..8d74194d1 100644 --- a/components/lib/treeselect/TreeSelect.d.ts +++ b/components/lib/treeselect/TreeSelect.d.ts @@ -174,7 +174,7 @@ export interface TreeSelectProps { options?: TreeNode[] | undefined; /** * Height of the viewport, a scrollbar is defined if height of list exceeds this value. - * @defaultValue 14rem + * @defaultValue 20rem */ scrollHeight?: string | undefined; /** diff --git a/components/lib/treeselect/style/TreeSelectStyle.js b/components/lib/treeselect/style/TreeSelectStyle.js index b08e2b8d1..2d3eb007a 100644 --- a/components/lib/treeselect/style/TreeSelectStyle.js +++ b/components/lib/treeselect/style/TreeSelectStyle.js @@ -103,6 +103,11 @@ const theme = ({ dt }) => ` overflow: hidden; } + +.p-treeselect-tree-container { + overflow: auto; +} + .p-treeselect-empty-message { padding: ${dt('treeselect.empty.message.padding')}; background: transparent;