fuck
This commit is contained in:
@@ -29,7 +29,7 @@ export interface SelectionAssignmentMenuProps {
|
||||
items?: SelectionAssignmentMenuItem[];
|
||||
placeholder?: string;
|
||||
emptyMessage?: string;
|
||||
createLabel?: string | null;
|
||||
createLabel?: string;
|
||||
onToggle?: (item: NormalizedSelectionAssignmentItem) => Promise<void> | void;
|
||||
onCreate?: (value: string) => Promise<void> | void;
|
||||
disabled?: boolean;
|
||||
@@ -82,7 +82,7 @@ const SelectionAssignmentMenu: React.FC<SelectionAssignmentMenuProps> = ({
|
||||
items = [],
|
||||
placeholder = 'Search…',
|
||||
emptyMessage = 'No entries',
|
||||
createLabel = null,
|
||||
createLabel = 'Add',
|
||||
onToggle,
|
||||
onCreate,
|
||||
disabled = false,
|
||||
@@ -91,8 +91,8 @@ const SelectionAssignmentMenu: React.FC<SelectionAssignmentMenuProps> = ({
|
||||
triggerClassName = 'quick-add__chip quick-add__trigger panel-floating-actions__trigger',
|
||||
showStateIndicators = true,
|
||||
showCounts = true,
|
||||
onOpenMenu = null,
|
||||
renderItemLabel = null,
|
||||
onOpenMenu,
|
||||
renderItemLabel,
|
||||
positionStrategy = 'absolute',
|
||||
}) => {
|
||||
const anchorRef = useRef<HTMLButtonElement | null>(null);
|
||||
@@ -162,7 +162,7 @@ const SelectionAssignmentMenu: React.FC<SelectionAssignmentMenuProps> = ({
|
||||
|
||||
const handleToggle = useCallback(
|
||||
async (item: NormalizedSelectionAssignmentItem) => {
|
||||
if (!item || !onToggle) {
|
||||
if (!onToggle) {
|
||||
return;
|
||||
}
|
||||
setPending(true);
|
||||
@@ -265,8 +265,8 @@ const SelectionAssignmentMenu: React.FC<SelectionAssignmentMenuProps> = ({
|
||||
type="submit"
|
||||
className="icon-button selection-assignment__add"
|
||||
disabled={!canSubmitCreate}
|
||||
aria-label={createLabel || 'Add'}
|
||||
title={createLabel || 'Add'}
|
||||
aria-label={createLabel}
|
||||
title={createLabel}
|
||||
>
|
||||
<PlusIcon aria-hidden="true" />
|
||||
</button>
|
||||
|
||||
Reference in New Issue
Block a user