Skip to content

Commit 88b7dcd

Browse files
committed
Merge branch 'release/v5.9.2'
2 parents 4323a79 + 6554c3b commit 88b7dcd

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

change-log.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88

99
##Change Log
1010

11+
###v5.9.2
12+
- Fix possible error when rendering table and overriding the attributes.
13+
- Merge DT parameters.
14+
1115
###v5.9.1
1216
- Fix default ajax value causing js data null error.
1317

src/yajra/Datatables/Html/Builder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ public function ajax($attributes)
275275
*/
276276
public function table(array $attributes = [])
277277
{
278-
$this->tableAttributes = $attributes ?: $this->tableAttributes;
278+
$this->tableAttributes = array_merge($this->tableAttributes, $attributes);
279279

280280
return '<table ' . $this->html->attributes($this->tableAttributes) . '></table>';
281281
}
@@ -288,7 +288,7 @@ public function table(array $attributes = [])
288288
*/
289289
public function parameters(array $attributes = [])
290290
{
291-
$this->attributes = $attributes;
291+
$this->attributes = array_merge($this->attributes, $attributes);
292292

293293
return $this;
294294
}

0 commit comments

Comments
 (0)