diff --git a/packages/frontend/core/src/components/filter/conditions/condition.tsx b/packages/frontend/core/src/components/filter/conditions/condition.tsx index 43d92a47fa..a9dab73a4d 100644 --- a/packages/frontend/core/src/components/filter/conditions/condition.tsx +++ b/packages/frontend/core/src/components/filter/conditions/condition.tsx @@ -39,6 +39,7 @@ export const Condition = ({ 1 ? 0 : 1} items={[ methods && (({ onDraftCompleted, menuRef }) => { diff --git a/packages/frontend/core/src/components/filter/options.tsx b/packages/frontend/core/src/components/filter/options.tsx index 98e1447176..4a09561685 100644 --- a/packages/frontend/core/src/components/filter/options.tsx +++ b/packages/frontend/core/src/components/filter/options.tsx @@ -13,10 +13,12 @@ export const FilterOptionsGroup = ({ isDraft, onDraftCompleted, items, + initialStep = 0, }: { isDraft?: boolean; onDraftCompleted?: () => void; items?: FilterOptionsGroupChildren[]; + initialStep?: number; }) => { const stepCount = items?.filter(v => { @@ -27,7 +29,7 @@ export const FilterOptionsGroup = ({ }).length ?? 0; const childRefs = useRef<(MenuRef | null)[]>([]); - const [currentStep, setCurrentStep] = useState(0); + const [currentStep, setCurrentStep] = useState(initialStep); const handleNextStep = useCallback(() => { // Add a small delay between steps to prevent the next menu from automatically closing due to the previous menu's close event