diff --git a/src/Traits/Helpers/ColumnSelectHelpers.php b/src/Traits/Helpers/ColumnSelectHelpers.php index 961c62847..3a856f4e8 100644 --- a/src/Traits/Helpers/ColumnSelectHelpers.php +++ b/src/Traits/Helpers/ColumnSelectHelpers.php @@ -61,8 +61,6 @@ public function getSelectableSelectedColumns(): Collection ->values(); } - public function getCurrentlySelectedCols(): void {} - public function getUnSelectableColumns(): Collection { return $this->getColumns() @@ -125,15 +123,6 @@ public function selectedVisibleColumns(): array ->toArray(); } - public function getVisibleColumns(): array - { - return $this->getColumns() - ->reject(fn (Column $column) => $column->isHidden()) - ->reject(fn (Column $column) => ($column->isSelectable() && ! $this->columnSelectIsEnabledForColumn($column))) - ->values() - ->toArray(); - } - public function selectAllColumns(): void { $this->selectedColumns = []; @@ -208,4 +197,15 @@ protected function setupFirstColumnSelectRun(): void } } + + /** To Be Removed */ + /* + public function getVisibleColumns(): array + { + return $this->selectedVisibleColumns(); + } + + public function getCurrentlySelectedCols(): void {} + */ + } diff --git a/src/Traits/Helpers/ToolsHelpers.php b/src/Traits/Helpers/ToolsHelpers.php index a73b7fe53..c0ef1e07a 100644 --- a/src/Traits/Helpers/ToolsHelpers.php +++ b/src/Traits/Helpers/ToolsHelpers.php @@ -77,13 +77,7 @@ public function displayToolbarSearch(): bool #[Computed] public function displayToolbarFilters(): bool { - if ($this->filtersAreEnabled() && $this->filtersVisibilityIsEnabled() && $this->hasVisibleFilters()) { - return true; - } elseif ($this->filtersAreEnabled() && $this->showBulkActionsDropdownAlpine() && $this->shouldAlwaysHideBulkActionsDropdownOption() != true) { - return true; - } - - return false; + return $this->filtersAreEnabled() && (($this->filtersVisibilityIsEnabled() && $this->hasVisibleFilters()) || ($this->showBulkActionsDropdownAlpine() && $this->shouldAlwaysHideBulkActionsDropdownOption() != true)); } protected function hasToolbarColumnSelect(): bool