File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -221,9 +221,9 @@ public function applySearchFilter(Builder $query): Builder
221
221
$ selectedColumn = ColumnUtilities::mapToSelected ($ column ->column (), $ query );
222
222
223
223
// If the column has a search callback, just use that
224
- if ($ column ->searchCallback ) {
224
+ if ($ column ->hasSearchCallback () ) {
225
225
// Call the callback
226
- ($ column ->searchCallback )($ query , $ search );
226
+ ($ column ->getSearchCallback () )($ query , $ search );
227
227
} elseif (! $ hasRelation || $ selectedColumn ) { // If the column isn't a relation or if it was previously selected
228
228
$ whereColumn = $ selectedColumn ?? $ column ->column ();
229
229
Original file line number Diff line number Diff line change @@ -246,4 +246,20 @@ public function getSortCallback(): ?callable
246
246
{
247
247
return $ this ->sortCallback ;
248
248
}
249
+
250
+ /**
251
+ * @return bool
252
+ */
253
+ public function hasSearchCallback (): bool
254
+ {
255
+ return $ this ->searchCallback !== null ;
256
+ }
257
+
258
+ /**
259
+ * @return callable|null
260
+ */
261
+ public function getSearchCallback (): ?callable
262
+ {
263
+ return $ this ->searchCallback ;
264
+ }
249
265
}
You can’t perform that action at this time.
0 commit comments