diff --git a/components/doc/multiselect/theming/tailwinddoc.js b/components/doc/multiselect/theming/tailwinddoc.js
index a50235bd1a..d9fb1d78aa 100644
--- a/components/doc/multiselect/theming/tailwinddoc.js
+++ b/components/doc/multiselect/theming/tailwinddoc.js
@@ -21,7 +21,7 @@ const Tailwind = {
multiselect: {
root: ({ props }) => ({
className: classNames('inline-flex cursor-pointer select-none', 'bg-white dark:bg-gray-900 border border-gray-400 dark:border-blue-900/40 transition-colors duration-200 ease-in-out rounded-md', 'w-full md:w-80', {
- 'opacity-60 select-none pointer-events-none cursor-default': props?.disabled
+ 'opacity-60 select-none pointer-events-none cursor-default': props.disabled
})
}),
labelContainer: 'overflow-hidden flex flex-auto cursor-pointer',
@@ -47,18 +47,20 @@ const Tailwind = {
headerCheckboxContainer: {
className: classNames('inline-flex cursor-pointer select-none align-bottom relative', 'mr-2', 'w-6 h-6')
},
- headerCheckbox: ({ context }) => ({
- className: classNames(
- 'flex items-center justify-center',
- 'border-2 w-6 h-6 text-gray-600 dark:text-white/70 rounded-lg transition-colors duration-200',
- 'hover:border-blue-500 focus:outline-none focus:outline-offset-0 focus:shadow-[0_0_0_0.2rem_rgba(191,219,254,1)] dark:focus:shadow-[0_0_0_0.2rem_rgba(147,197,253,0.5)]',
- {
- 'border-gray-300 dark:border-blue-900/40 bg-white dark:bg-gray-900': !context?.selected,
- 'border-blue-500 bg-blue-500': context?.selected
- }
- )
- }),
- headercheckboxicon: 'w-4 h-4 transition-all duration-200 text-white text-base',
+ headerCheckbox: {
+ root: ({ props }) => ({
+ className: classNames(
+ 'flex items-center justify-center',
+ 'border-2 w-6 h-6 text-gray-600 dark:text-white/70 rounded-lg transition-colors duration-200',
+ 'hover:border-blue-500 focus:outline-none focus:outline-offset-0 focus:shadow-[0_0_0_0.2rem_rgba(191,219,254,1)] dark:focus:shadow-[0_0_0_0.2rem_rgba(147,197,253,0.5)]',
+ {
+ 'border-gray-300 dark:border-blue-900/40 bg-white dark:bg-gray-900': !props?.checked,
+ 'border-blue-500 bg-blue-500': props?.checked
+ }
+ )
+ })
+ },
+ headerCheckboxIcon: 'w-4 h-4 transition-all duration-200 text-white text-base',
closeButton: {
className: classNames(
'flex items-center justify-center overflow-hidden relative',
@@ -67,7 +69,7 @@ const Tailwind = {
'focus:outline-none focus:outline-offset-0 focus:shadow-[0_0_0_0.2rem_rgba(191,219,254,1)] dark:focus:shadow-[0_0_0_0.2rem_rgba(147,197,253,0.5)]'
)
},
- closeButtonIcon: 'w-4 h-4 inline-block',
+ closeIcon: 'w-4 h-4 inline-block',
wrapper: {
className: classNames('max-h-[200px] overflow-auto', 'bg-white text-gray-700 border-0 rounded-md shadow-lg', 'dark:bg-gray-900 dark:text-white/80')
},
@@ -89,17 +91,17 @@ const Tailwind = {
'border-2 w-6 h-6 text-gray-600 dark:text-white/80 rounded-lg transition-colors duration-200',
'hover:border-blue-500 focus:outline-none focus:outline-offset-0 focus:shadow-[0_0_0_0.2rem_rgba(191,219,254,1)] dark:focus:shadow-[0_0_0_0.2rem_rgba(147,197,253,0.5)]',
{
- 'border-gray-300 dark:border-blue-900/40 bg-white dark:bg-gray-900': !context?.selected,
- 'border-blue-500 bg-blue-500': context?.selected
+ 'border-gray-300 dark:border-blue-900/40 bg-white dark:bg-gray-900': !context.selected,
+ 'border-blue-500 bg-blue-500': context.selected
}
)
}),
- checkboxicon: 'w-4 h-4 transition-all duration-200 text-white text-base',
- itemgroup: {
+ checkboxIcon: 'w-4 h-4 transition-all duration-200 text-white text-base',
+ itemGroup: {
className: classNames('m-0 p-3 text-gray-800 bg-white font-bold', 'dark:bg-gray-900 dark:text-white/80', 'cursor-auto')
},
- filtercontainer: 'relative',
- filterinput: {
+ filterContainer: 'relative',
+ filterInput: {
className: classNames(
'pr-7 -mr-7',
'w-full',
@@ -108,8 +110,8 @@ const Tailwind = {
'hover:border-blue-500 focus:outline-none focus:outline-offset-0 focus:shadow-[0_0_0_0.2rem_rgba(191,219,254,1)] dark:focus:shadow-[0_0_0_0.2rem_rgba(147,197,253,0.5)]'
)
},
- filtericon: '-mt-2 absolute top-1/2',
- clearicon: 'text-gray-500 right-12 -mt-2 absolute top-1/2',
+ filterIcon: '-mt-2 absolute top-1/2',
+ clearIcon: 'text-gray-500 right-12 -mt-2 absolute top-1/2',
transition: TRANSITIONS.overlay
}
}
diff --git a/components/lib/multiselect/MultiSelectHeader.js b/components/lib/multiselect/MultiSelectHeader.js
index 3921b27679..262819c889 100644
--- a/components/lib/multiselect/MultiSelectHeader.js
+++ b/components/lib/multiselect/MultiSelectHeader.js
@@ -6,7 +6,7 @@ import { SearchIcon } from '../icons/search';
import { TimesIcon } from '../icons/times';
import { InputText } from '../inputtext/InputText';
import { Ripple } from '../ripple/Ripple';
-import { IconUtils, ObjectUtils, UniqueComponentId, mergeProps } from '../utils/Utils';
+import { IconUtils, ObjectUtils, UniqueComponentId, classNames, mergeProps } from '../utils/Utils';
export const MultiSelectHeader = React.memo((props) => {
const { ptm, cx, isUnstyled } = props;
@@ -116,12 +116,19 @@ export const MultiSelectHeader = React.memo((props) => {
getPTOptions('headerCheckboxIcon')
);
+ const headerCheckboxContainerProps = mergeProps(
+ {
+ className: classNames('p-multiselect-select-all', cx('headerCheckboxContainer'))
+ },
+ getPTOptions('headerCheckboxContainer')
+ );
+
const checkedIcon = props.itemCheckboxIcon ||