diff --git a/packages/sheets-filter-ui/src/views/components/SheetsFilterByConditionsPanel.tsx b/packages/sheets-filter-ui/src/views/components/SheetsFilterByConditionsPanel.tsx index 3f73a50ec95..7ce8245e5ef 100644 --- a/packages/sheets-filter-ui/src/views/components/SheetsFilterByConditionsPanel.tsx +++ b/packages/sheets-filter-ui/src/views/components/SheetsFilterByConditionsPanel.tsx @@ -35,12 +35,10 @@ export function FilterByCondition(props: { model: ByConditionsModel }) { const localeService = useDependency(LocaleService); // form state is from the model - const condition = useObservable(model.conditionItem$, undefined, true); - const formParams = useObservable(model.filterConditionFormParams$, undefined, true); - const { operator, numOfParameters } = condition; - const { operator1, operator2, val1, val2, and } = formParams; + const condition = useObservable(model.conditionItem$, undefined); + const formParams = useObservable(model.filterConditionFormParams$, undefined); - const radioValue = and ? 'AND' : 'OR'; + const radioValue = formParams?.and ? 'AND' : 'OR'; const onRadioChange = useCallback((key: string | number | boolean) => { model.onConditionFormChange({ and: key === 'AND' }); }, [model]); @@ -79,20 +77,24 @@ export function FilterByCondition(props: { model: ByConditionsModel }) { return (