Skip to content

Commit

Permalink
Patch 3 (#54)
Browse files Browse the repository at this point in the history
* Reference to rappasoft#864 fixes for bootstrap-5 theme

This was a change implemented via the coreui update.

* Updated toolbar.php to allow dropdown functionality.

Changed the dropdown behavior to Alpine.js to the same behavior as the column select.

* Update toolbar.blade.php

wire:key name was incorrect.

---------

Co-authored-by: ccsliinc <jsugamele@gmail.com>
  • Loading branch information
lrljoe and ccsliinc authored Mar 31, 2023
1 parent 825621b commit a3c42c2
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions resources/views/components/tools/toolbar.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -732,12 +732,28 @@ class="dropdown-item text-center"

@if ($component->showBulkActionsDropdown())
<div class="mb-3 mb-md-0">
<div class="dropdown d-block d-md-inline">
<button class="btn dropdown-toggle d-block w-100 d-md-inline" type="button" id="{{ $component->getTableName() }}-bulkActionsDropdown" data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<div class="dropdown d-block d-md-inline"
x-data="{ open: false }"
x-on:keydown.escape.stop="open = false"
x-on:mousedown.away="open = false"
wire:key="column-select-button-{{ $component->getTableName() }}"
>
<button
x-on:click="open = !open"
class="btn dropdown-toggle d-block w-100 d-md-inline"
type="button"
id="{{ $component->getTableName() }}-bulkActionsDropdown"
aria-haspopup="true"
x-bind:aria-expanded="open"
>
@lang('Bulk Actions')
</button>

<div class="dropdown-menu dropdown-menu-end w-100" aria-labelledby="{{ $component->getTableName() }}-bulkActionsDropdown">
<div
class="dropdown-menu dropdown-menu-right w-100"
x-bind:class="{'show' : open}"
aria-labelledby="{{ $component->getTableName() }}-bulkActionsDropdown"
>
@foreach($component->getBulkActions() as $action => $title)
<a
href="#"
Expand Down Expand Up @@ -766,7 +782,7 @@ class="dropdown d-block d-md-inline"
x-on:click="open = !open"
class="btn dropdown-toggle d-block w-100 d-md-inline"
type="button"
id="columnSelect-{{ $component->getTableName() }}"
wire:key="bulk-actions-dropdown-button-{{ $component->getTableName() }}"
aria-haspopup="true"
x-bind:aria-expanded="open"
>
Expand Down

0 comments on commit a3c42c2

Please sign in to comment.