Skip to content

Commit f7d4655

Browse files
authored
Merge pull request #3182 from hirakujira/master
Fix filter fallback doesn't work issue
2 parents 062f04a + 6f60f64 commit f7d4655

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/app/Library/CrudPanel/CrudFilter.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,11 @@ public function apply($input = null)
106106
$input = $input ?? new ParameterBag($this->crud()->getRequest()->all());
107107

108108
if (! $input->has($this->name)) {
109+
// if fallback logic was supplied and is a closure
110+
if (is_callable($this->fallbackLogic)) {
111+
return ($this->fallbackLogic)();
112+
}
113+
109114
return;
110115
}
111116

@@ -115,11 +120,6 @@ public function apply($input = null)
115120
} else {
116121
return $this->applyDefaultLogic($this->name, false);
117122
}
118-
119-
// if fallback logic was supplied and is a closure
120-
if (is_callable($this->fallbackLogic)) {
121-
return ($this->fallbackLogic)();
122-
}
123123
}
124124

125125
/**

0 commit comments

Comments
 (0)