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/Traits/Configuration/SearchConfiguration.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public function setSearchPlaceholder(string $placeholder): self

public function setSearchFieldAttributes(array $attributes = []): self
{
$this->setCustomAttributes('searchFieldAttributes', $attributes);
$this->setCustomAttributes('searchFieldAttributes', array_merge(['default' => false, 'default-colors' => false, 'default-styling' => false], $attributes));

return $this;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Traits/Helpers/SearchHelpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public function hasSearchPlaceholder(): bool

public function getSearchFieldAttributes(): array
{
return $this->getCustomAttributes('searchFieldAttributes');
return $this->getCustomAttributes('searchFieldAttributes', true);
}

public function shouldTrimSearchString(): bool
Expand Down
2 changes: 1 addition & 1 deletion tests/Traits/Configuration/SearchConfigurationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ public function test_can_set_search_placeholder(): void

public function test_can_set_search_field_attributes(): void
{
$this->assertSame(['default' => false, 'default-colors' => false, 'default-styling' => false], $this->basicTable->getSearchFieldAttributes());
$this->assertSame(['default' => true, 'default-colors' => true, 'default-styling' => true], $this->basicTable->getSearchFieldAttributes());

$this->basicTable->setSearchFieldAttributes(['class' => 'bg-blue', 'style' => 'font-size: 3em;']);

Expand Down
Loading