diff --git a/uui/components/pickers/DataPickerFooter.tsx b/uui/components/pickers/DataPickerFooter.tsx index 698417b595..43019faaa8 100644 --- a/uui/components/pickers/DataPickerFooter.tsx +++ b/uui/components/pickers/DataPickerFooter.tsx @@ -31,7 +31,6 @@ function DataPickerFooterImpl(props: PropsWithChildren 0; const rowsCount = view.getListProps().rowsCount; - const isEmptyRowsAndHasNoSelection = (rowsCount === 0 && !hasSelection); const isSinglePicker = selectionMode === 'single'; @@ -39,9 +38,10 @@ function DataPickerFooterImpl(props: PropsWithChildren @@ -58,26 +58,19 @@ function DataPickerFooterImpl(props: PropsWithChildren - {view.selectAll && ( + {view.selectAll && !hasSelection && ( view.selectAll.onValueChange(true) } - rawProps={ { - 'aria-label': hasSelection ? clearAllText : selectAllText, - } } - isDisabled={ isEmptyRowsAndHasNoSelection } + caption={ selectAllText } + onClick={ () => view.selectAll.onValueChange(true) } /> )} - {!view.selectAll && ( + { showClear && ( )}