This commit is contained in:
2025-11-14 02:35:17 +01:00
parent 6f4ff68062
commit a3c5494bf7
53 changed files with 269 additions and 340 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import type { CSSProperties, ReactNode, FormEvent, MutableRefObject } from 'react';
import { PlusIcon } from './icons';
import { isPlainObject } from '../utils/typeGuards';
import useFloatingMenu from './useFloatingMenu';
type QuickAddOption = string | number | { id?: string | number; label?: string; name?: string; [key: string]: unknown };
@@ -16,7 +17,7 @@ const normalizeOption = (option: QuickAddOption | null | undefined, index: numbe
if (option == null) {
return null;
}
if (typeof option === 'object') {
if (isPlainObject(option)) {
const label = option.label ?? option.name;
if (label == null) {
return null;