From ff1174259b6745df4f97c3752336163687edbd48 Mon Sep 17 00:00:00 2001 From: eireland Date: Mon, 29 Jan 2024 09:58:49 -0800 Subject: [PATCH 1/2] Fixes filter modal and filter dropdown width to fit new wording. --- src/components/attribute-filter.scss | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/attribute-filter.scss b/src/components/attribute-filter.scss index 4b2d083..534f9da 100644 --- a/src/components/attribute-filter.scss +++ b/src/components/attribute-filter.scss @@ -105,7 +105,7 @@ table tr:nth-child(even) { box-sizing: border-box; &.wide { - width: 217px; + width: 227px; left: 114px; } @@ -208,7 +208,7 @@ table tr:nth-child(even) { } .filter-operator-selection-container { - width: 165px; + width: 180px; max-height: 190px; padding: 9px 12px 5px 9px; box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.5); @@ -226,6 +226,7 @@ table tr:nth-child(even) { height: 176px; outline: none; box-sizing: border-box; + overflow: hidden; option { font-family: "Montserrat", sans-serif; From 1a01416be8254aba10dc0f617b0265542153f553 Mon Sep 17 00:00:00 2001 From: eireland Date: Mon, 29 Jan 2024 12:01:04 -0800 Subject: [PATCH 2/2] Changes Reset behavior to not close the modal and reset to default values instead of previously entered values --- src/components/attribute-filter.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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]}`}> ; } };