From 148ae6ad4ac9682ab5a868e7f8f5e9ba8660741f Mon Sep 17 00:00:00 2001 From: Alexandr Isaev Date: Tue, 9 Jul 2024 13:36:14 +0300 Subject: [PATCH] fix(TreeSelect): added disabled prop --- src/components/TreeSelect/TreeSelect.tsx | 2 ++ src/components/TreeSelect/types.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/components/TreeSelect/TreeSelect.tsx b/src/components/TreeSelect/TreeSelect.tsx index db8f814f1b..9da524004a 100644 --- a/src/components/TreeSelect/TreeSelect.tsx +++ b/src/components/TreeSelect/TreeSelect.tsx @@ -47,6 +47,7 @@ export const TreeSelect = React.forwardRef(function TreeSelect( items, value: propsValue, defaultValue, + disabled = false, withExpandedState = true, defaultExpandedState = 'expanded', onClose, @@ -157,6 +158,7 @@ export const TreeSelect = React.forwardRef(function TreeSelect( ref: handleControlRef, size, value, + disabled, id: treeSelectId, activeItemId: list.state.activeItemId, title, diff --git a/src/components/TreeSelect/types.ts b/src/components/TreeSelect/types.ts index 23e1833c23..720fb9a46f 100644 --- a/src/components/TreeSelect/types.ts +++ b/src/components/TreeSelect/types.ts @@ -15,6 +15,7 @@ import type {UseListParsedStateProps} from '../useList/hooks/useListParsedState' export type TreeSelectRenderControlProps = { list: UseListResult; open: boolean; + disabled: boolean; toggleOpen(): void; clearValue(): void; ref: React.Ref; @@ -44,6 +45,7 @@ export interface TreeSelectProps */ title?: string; value?: ListItemId[]; + disabled?: boolean; defaultValue?: ListItemId[] | undefined; popupClassName?: string; popupWidth?: SelectPopupProps['width'];