From b287ab7f6dc80f9ad07df72a44ea2ac9f9882fae Mon Sep 17 00:00:00 2001 From: Erik Jan de Wit Date: Wed, 21 Aug 2024 10:38:09 +0200 Subject: [PATCH] added isDisabled to menu toggle (#32202) fixes: #32156 Signed-off-by: Erik Jan de Wit --- js/libs/ui-shared/src/select/SingleSelect.tsx | 2 ++ js/libs/ui-shared/src/select/TypeaheadSelect.tsx | 2 ++ 2 files changed, 4 insertions(+) diff --git a/js/libs/ui-shared/src/select/SingleSelect.tsx b/js/libs/ui-shared/src/select/SingleSelect.tsx index 6df6bfeec4..b635c0ab3e 100644 --- a/js/libs/ui-shared/src/select/SingleSelect.tsx +++ b/js/libs/ui-shared/src/select/SingleSelect.tsx @@ -21,6 +21,7 @@ export const SingleSelect = ({ maxHeight, toggleIcon, className, + isDisabled, children, ...props }: SingleSelectProps) => { @@ -69,6 +70,7 @@ export const SingleSelect = ({ isExpanded={isOpen} aria-label={props["aria-label"]} icon={toggleIcon} + isDisabled={isDisabled} isFullWidth > {childArray.find((c) => c.props.value === selections)?.props diff --git a/js/libs/ui-shared/src/select/TypeaheadSelect.tsx b/js/libs/ui-shared/src/select/TypeaheadSelect.tsx index 144de178cd..08d9c344eb 100644 --- a/js/libs/ui-shared/src/select/TypeaheadSelect.tsx +++ b/js/libs/ui-shared/src/select/TypeaheadSelect.tsx @@ -37,6 +37,7 @@ export const TypeaheadSelect = ({ chipGroupComponent, chipGroupProps, footer, + isDisabled, children, ...rest }: KeycloakSelectProps) => { @@ -124,6 +125,7 @@ export const TypeaheadSelect = ({ variant="typeahead" onClick={() => onToggle?.(true)} icon={toggleIcon} + isDisabled={isDisabled} isExpanded={rest.isOpen} isFullWidth status={validated === "error" ? MenuToggleStatus.danger : undefined}