From 5ab8ec58ccab374bf00ace89ed214bfec6325b09 Mon Sep 17 00:00:00 2001 From: Arthur Patterson Date: Tue, 21 May 2024 10:43:22 -0500 Subject: [PATCH] fix: ComboBoxInput.tsx uses chips only if multiselect --- src/components/Pagination.tsx | 2 +- src/inputs/internal/ComboBoxInput.tsx | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/components/Pagination.tsx b/src/components/Pagination.tsx index 7f8d06d60..1a701a736 100644 --- a/src/components/Pagination.tsx +++ b/src/components/Pagination.tsx @@ -50,7 +50,7 @@ export function Pagination(props: PaginationProps) {
Page size:
-
+
(props: ComboBoxInputProps 1; - // Show selections as chips - const hasSelection = state.selectionManager.selectedKeys.size > 0; + // Show selections as chips when using multiselect when unfocused + const showChipSelection = isMultiSelect && state.selectionManager.selectedKeys.size > 0; // For MultiSelect only show the `fieldDecoration` when input is not in focus. const showFieldDecoration = (!isMultiSelect || (isMultiSelect && !isFocused)) && fieldDecoration && selectedOptions.length === 1; @@ -99,7 +98,7 @@ export function ComboBoxInput(props: ComboBoxInputProps} + unfocusedPlaceholder={showChipSelection && } inputRef={inputRef} inputWrapRef={inputWrapRef} errorMsg={errorMsg}