Skip to content

Commit

Permalink
new fix
Browse files Browse the repository at this point in the history
  • Loading branch information
markallenramirez committed Dec 12, 2024
1 parent 568be08 commit 3bf6c5c
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,13 @@ const updateFilterRowCondition = function (columnsController, column, condition)
const filterValue = condition?.[2];
const filterOperations = column.filterOperations || column.defaultFilterOperations;

if ((!filterOperations || filterOperations.indexOf(selectedFilterOperation) >= 0 || selectedFilterOperation === column.defaultFilterOperation)
&& FILTER_ROW_OPERATIONS.includes(selectedFilterOperation) && filterValue !== null) {
if (selectedFilterOperation === column.defaultFilterOperation && !isDefined(column.selectedFilterOperation)) {
const selectedOperationExists = filterOperations.indexOf(selectedFilterOperation) >= 0;
const defaultOperationSelected = selectedFilterOperation === column.defaultFilterOperation;
const builtInOperationSelected = FILTER_ROW_OPERATIONS.includes(selectedFilterOperation);
const filterValueNotNullOrEmpty = filterValue !== null && filterValue !== '';

if ((!filterOperations || selectedOperationExists || defaultOperationSelected) && builtInOperationSelected && filterValueNotNullOrEmpty) {
if (defaultOperationSelected && !isDefined(column.selectedFilterOperation)) {
selectedFilterOperation = column.selectedFilterOperation;
}
filterRowOptions = {
Expand Down

0 comments on commit 3bf6c5c

Please sign in to comment.