Skip to content

Commit

Permalink
fix(TreeSelect): add disabled prop (#1697)
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaevAlexandr authored Jul 15, 2024
1 parent 7e4dd23 commit f9650da
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 f9650da

Please sign in to comment.