Skip to content

Commit

Permalink
fix(TreeSelect): added disabled prop
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaevAlexandr committed Jul 9, 2024
1 parent 610e49b commit 148ae6a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/TreeSelect/TreeSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export const TreeSelect = React.forwardRef(function TreeSelect<T>(
items,
value: propsValue,
defaultValue,
disabled = false,
withExpandedState = true,
defaultExpandedState = 'expanded',
onClose,
Expand Down Expand Up @@ -157,6 +158,7 @@ export const TreeSelect = React.forwardRef(function TreeSelect<T>(
ref: handleControlRef,
size,
value,
disabled,
id: treeSelectId,
activeItemId: list.state.activeItemId,
title,
Expand Down
2 changes: 2 additions & 0 deletions src/components/TreeSelect/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import type {UseListParsedStateProps} from '../useList/hooks/useListParsedState'
export type TreeSelectRenderControlProps<T> = {
list: UseListResult<T>;
open: boolean;
disabled: boolean;
toggleOpen(): void;
clearValue(): void;
ref: React.Ref<HTMLButtonElement>;
Expand Down Expand Up @@ -44,6 +45,7 @@ export interface TreeSelectProps<T, P extends {} = {}>
*/
title?: string;
value?: ListItemId[];
disabled?: boolean;
defaultValue?: ListItemId[] | undefined;
popupClassName?: string;
popupWidth?: SelectPopupProps['width'];
Expand Down

0 comments on commit 148ae6a

Please sign in to comment.