Skip to content

Commit

Permalink
fix bulk action bar positioning (#1370)
Browse files Browse the repository at this point in the history
* fix bulk action bar positioning

* remove extra space
  • Loading branch information
gariasf authored Oct 28, 2024
1 parent 277fb3d commit 3cd364a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/javascript/controllers/bulk_select_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export default class extends Controller {
_updateSelectionBar() {
const count = this.selectedIdsValue.length;
this.selectionBarTextTarget.innerText = `${count} ${this._pluralizedResourceName()} selected`;
this.selectionBarTarget.hidden = count === 0;
this.selectionBarTarget.classList.toggle("hidden", count === 0);
this.selectionBarTarget.querySelector("input[type='checkbox']").checked =
count > 0;
}
Expand Down
2 changes: 1 addition & 1 deletion app/views/transactions/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<%= render "transactions/searches/search" %>
<% if @transaction_entries.present? %>
<div hidden id="entry-selection-bar" data-bulk-select-target="selectionBar">
<div id="entry-selection-bar" data-bulk-select-target="selectionBar" class="flex justify-center hidden">
<%= render "account/transactions/selection_bar" %>
</div>
<div class="grow overflow-y-auto">
Expand Down

0 comments on commit 3cd364a

Please sign in to comment.