Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Html/Options/Plugins/ColumnControl.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public function columnControlFooter(array $content, int $target = 0): static

public function columnControlFooterSearch(array $content = []): static
{
$this->addColumnControl('tfoot', [empty($content) ? ['search'] : $content]);
$this->columnControlFooter(empty($content) ? ['search'] : $content);

return $this;
}
Expand Down
10 changes: 4 additions & 6 deletions tests/Html/Builder/BuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -318,12 +318,10 @@ public function it_can_set_template_data(): void

$builder
->setTableId('my-table')
->setTemplateData(function (Builder $builder): array {
return [
'tableId' => $builder->getTableId(),
'message' => 'Set Template Data Using Callback',
];
});
->setTemplateData(fn (Builder $builder): array => [
'tableId' => $builder->getTableId(),
'message' => 'Set Template Data Using Callback',
]);

$this->assertStringContainsString(
"console.log({ tableId: 'my-table', message: 'Set Template Data Using Callback' });",
Expand Down
4 changes: 2 additions & 2 deletions tests/Html/Extensions/ColumnControlTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public function it_can_add_column_control_footer_search()

$this->assertInstanceOf(Builder::class, $result);
$expected = [
['target' => 'tfoot', 'content' => [['search']]],
['target' => 'tfoot:0', 'content' => ['search']],
];
$this->assertEquals($expected, $builder->getAttributes()['columnControl']);
}
Expand All @@ -125,7 +125,7 @@ public function it_can_add_column_control_footer_search_with_custom_content()

$this->assertInstanceOf(Builder::class, $result);
$expected = [
['target' => 'tfoot', 'content' => [['customSearch']]],
['target' => 'tfoot:0', 'content' => ['customSearch']],
];
$this->assertEquals($expected, $builder->getAttributes()['columnControl']);
}
Expand Down