-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show bulk actions below table #13530
base: 3.x
Are you sure you want to change the base?
Conversation
@zepfietje would appreciate the green light on the design before I proceed into the code please |
Personally I don't think having the actions at the bottom results in a good UI/UX. |
@zepfietje it was a client who requested it - their reasoning was they work their way down the table selecting all the relevant records and always finish at the bottom where they wanted the action button instead of having to scroll to the top. The table is implemented as a checklist where they need to work through all the rows selecting all the relevant records at once. |
Hmm, I'm wondering if the bulk select checkbox and select/deselect actions should be in the footer too then? |
@zepfietje I've added this above the action let me know what you think. Also added the option to display both above and below table. You can get clever with not displaying this on a small tables. ->bulkActionsPosition(
fn (Table $table) => $table->getRecords()->count() > 5
? Tables\Enums\BulkActionsPosition::AboveAndBelowTable
: Tables\Enums\BulkActionsPosition::AboveTable
) |
@@ -1250,6 +1254,36 @@ class="fi-ta-record-checkbox" | |||
@endif | |||
</div> | |||
|
|||
@if ($hasBulkActionsBelowTable && (! $isReordering) && count($bulkActions)) | |||
<div |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to minimize duplication here and in the header?
Maintenance of the table index view is already very hard, so I don't want to introduce additional complexity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zepfietje please let me know what changes you think best to improve this.
Perhaps using capture
blade directive? But due to it not including the reorder action in the footer I think the selection-indicator
and bulk actionfilament-tables::actions
would need to be captured separately?
@howdu, shouldn't it also show the bulk selection checkbox? |
@zepfietje I think adding the bulk checkbox would overcomplicate this. I was trying to keep it simple and work the same as filter position above/below. |
Alright, I understand now since the bulk selection checkbox is in the column headers row. |
@zepfietje it displays above the pagination so doesn't affect that. |
Description
Add option to display bulk actions below table
Visual changes
Functional changes
composer cs
command.