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
8 changes: 4 additions & 4 deletions src/DataTransferObjects/Filters/FilterPillData.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function getCustomResetButtonAttributes(): array

public function getIsAnExternalLivewireFilter(): int
{
return intval($this->isAnExternalLivewireFilter ?? false);
return intval($this->isAnExternalLivewireFilter ?? 0);
}

public function getSeparator(): string
Expand All @@ -68,17 +68,17 @@ public function getSeparator(): string

public function shouldUsePillsAsHtml(): int
{
return intval($this->renderPillsAsHtml ?? false);
return intval($this->renderPillsAsHtml ?? 0);
}

public function shouldUsePillsTitleAsHtml(): int
{
return intval($this->renderPillsTitleAsHtml ?? false);
return intval($this->renderPillsTitleAsHtml ?? 0);
}

public function shouldWatchForEvents(): int
{
return intval($this->watchForEvents ?? false);
return intval($this->watchForEvents ?? 0);
}

public function isPillValueAnArray(): bool
Expand Down
2 changes: 1 addition & 1 deletion src/View/Components/FilterPill.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class FilterPill extends Component

public function __construct(public string $filterKey, public FilterPillData $filterPillData)
{
$this->shouldWatch = $this->filterPillData->shouldWatchForEvents() ?? 0;
$this->shouldWatch = (bool) $this->filterPillData->shouldWatchForEvents();
}

public function render(): null|string|\Illuminate\Support\HtmlString|\Illuminate\Contracts\Foundation\Application|\Illuminate\Contracts\View\Factory|\Illuminate\Contracts\View\View
Expand Down
Loading