From 11e9ceba90ff3e3622596dc07569f167dc5db487 Mon Sep 17 00:00:00 2001 From: Simeon Benson Date: Thu, 16 May 2024 20:22:50 +0700 Subject: [PATCH] docs: adding functionality to hide the grouping direction --- packages/tables/docs/08-grouping.md | 15 +++++++++++++++ tests/src/Tables/Concerns/CanGroupRecordsTest.php | 14 -------------- 2 files changed, 15 insertions(+), 14 deletions(-) delete mode 100644 tests/src/Tables/Concerns/CanGroupRecordsTest.php diff --git a/packages/tables/docs/08-grouping.md b/packages/tables/docs/08-grouping.md index 1fc5000c2a..743d1d8f44 100644 --- a/packages/tables/docs/08-grouping.md +++ b/packages/tables/docs/08-grouping.md @@ -323,6 +323,21 @@ public function table(Table $table): Table } ``` +## Hiding the grouping direction settings + +You can hide the grouping direction drop-down select interface using the `groupingDirectionHidden()` method: + +```php +use Filament\Tables\Table; + +public function table(Table $table): Table +{ + return $table + ->defaultGroup('status'); + ->groupingDirectionHidden(); +} +``` + ## Hiding the grouping settings You can hide the grouping settings interface using the `groupingSettingsHidden()` method: diff --git a/tests/src/Tables/Concerns/CanGroupRecordsTest.php b/tests/src/Tables/Concerns/CanGroupRecordsTest.php deleted file mode 100644 index daf2e83ff1..0000000000 --- a/tests/src/Tables/Concerns/CanGroupRecordsTest.php +++ /dev/null @@ -1,14 +0,0 @@ -assertHasNoErrors() - ->assertDontSee('') - ->assertDontSee(__('filament-tables::table.grouping.fields.direction.options.asc')) - ->assertDontSee(__('filament-tables::table.grouping.fields.direction.options.desc')); -});