Skip to content

Commit 6453bf4

Browse files
author
Herbert Maschke
committed
only call applyPinnedRecord() when given table is using canPinRecords Trait
1 parent f2f5a40 commit 6453bf4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Http/Livewire/LivewireDatatable.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1184,8 +1184,11 @@ public function buildDatabaseQuery($export = false)
11841184
->addDateRangeFilter()
11851185
->addTimeRangeFilter()
11861186
->addComplexQuery()
1187-
->applyPinnedRecords()
11881187
->addSort();
1188+
1189+
if (isset($this->pinnedRecors)) {
1190+
$this->applyPinnedRecords();
1191+
}
11891192
}
11901193

11911194
public function complexQuery($rules)

0 commit comments

Comments
 (0)