Skip to content

Commit 23dd150

Browse files
authored
IBX-9361: The 'x' button in search for Clients list doesn't work (#1435)
1 parent 574d20f commit 23dd150

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

src/bundle/Resources/public/js/scripts/filters.action.btns.js

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,24 @@
7878
};
7979
const handleFormClear = () => {
8080
clearForm();
81-
clearBtn.disabled = true;
82-
applyBtn.disabled = !checkFieldsValuesChanged();
83-
applyBtn.click();
81+
82+
if (clearBtn) {
83+
clearBtn.disabled = true;
84+
}
85+
86+
if (applyBtn) {
87+
applyBtn.disabled = !checkFieldsValuesChanged();
88+
applyBtn.click();
89+
}
8490
};
8591
const handleInputChange = () => {
86-
clearBtn.disabled = checkAreFiltersCleared();
87-
applyBtn.disabled = !checkFieldsValuesChanged();
92+
if (clearBtn) {
93+
clearBtn.disabled = checkAreFiltersCleared();
94+
}
95+
96+
if (applyBtn) {
97+
applyBtn.disabled = !checkFieldsValuesChanged();
98+
}
8899
};
89100

90101
dropdownNodes.forEach((dropdownNode) => {

0 commit comments

Comments
 (0)