diff --git a/src/Dropdowns/AssigneeSelect/AssigneeDropdownTemplate.tsx b/src/Dropdowns/AssigneeSelect/AssigneeDropdownTemplate.tsx index fba658d..9da679d 100644 --- a/src/Dropdowns/AssigneeSelect/AssigneeDropdownTemplate.tsx +++ b/src/Dropdowns/AssigneeSelect/AssigneeDropdownTemplate.tsx @@ -39,6 +39,7 @@ export interface AssigneeDropdownProps { fullName?: string avatarUrl?: string isSelected?: boolean + isSelectedMixed?: boolean multiSelect: boolean onClick?: () => void size?: number @@ -52,6 +53,7 @@ export const AssigneeDropdownTemplate = ({ avatarUrl, fullName, isSelected, + isSelectedMixed, multiSelect, onClick, size = 21, @@ -77,7 +79,8 @@ export const AssigneeDropdownTemplate = ({ {fullName || name} {!!error && ' (missing)'} - {multiSelect && isSelected && } + {} + {multiSelect && (isSelected || isSelectedMixed) && } ) } diff --git a/src/Dropdowns/AssigneeSelect/AssigneeSelect.tsx b/src/Dropdowns/AssigneeSelect/AssigneeSelect.tsx index 131361d..42fce17 100644 --- a/src/Dropdowns/AssigneeSelect/AssigneeSelect.tsx +++ b/src/Dropdowns/AssigneeSelect/AssigneeSelect.tsx @@ -101,10 +101,11 @@ export const AssigneeSelect = forwardRef( options={sortedOptions} dataKey={'name'} disabled={disabled} - itemTemplate={(ops, isActive, isSelected) => ( + itemTemplate={(ops, _isActive, isSelected, _index, selectedMixed) => ( ( {option.icon && } {option[labelKey] || option[dataKey]} {multiSelect && - selected?.includes(option[dataKey]) && + [...selected, ...mixedSelected]?.includes(option[dataKey]) && selected.length > minSelected && ( )}