diff --git a/src/components/attribute-filter.tsx b/src/components/attribute-filter.tsx index adaea95..64bf950 100644 --- a/src/components/attribute-filter.tsx +++ b/src/components/attribute-filter.tsx @@ -206,8 +206,10 @@ const FilterModal = ({attr, position, targetFilterBottom, setShowFilterModal, se },[dropdownBottom, showOperatorSelectionModal, windowHeight]); const handleReset = () => { - setOperator(currentAttrFilter?.operator || "equals"); - setShowFilterModal(false); + setOperator("equals"); + if (filterValueInputElRef.current) { + filterValueInputElRef.current.value = "0"; + } }; const handleSubmitFilter = () => { @@ -294,7 +296,7 @@ const FilterModal = ({attr, position, targetFilterBottom, setShowFilterModal, se ; } else { return + defaultValue={`${Array.isArray(currentFilterValue) ? currentFilterValue[0] : "0"} ${currentAttr?.unit[units]}`}> ; } };