fix(batch): disable dropdown when alls buttons inside are disabled

Co-Authored-by: Lisa Durand <lisa.c.durand@gmail.com>
This commit is contained in:
Colin Darie 2023-07-11 18:30:52 +02:00
parent ae55655014
commit 9462d66778
3 changed files with 28 additions and 9 deletions

View file

@ -11,10 +11,10 @@
.dropdown{ data: { controller: 'menu-button', popover: 'true' } }
-# Dropdown button title
%button.fr-btn.fr-btn--sm.fr-btn--secondary.fr-ml-1w.dropdown-button{ disabled: true, data: { menu_button_target: 'button', batch_operation_target: 'menu' } }
%button#batch_operation_others.fr-btn.fr-btn--sm.fr-btn--secondary.fr-ml-1w.dropdown-button{ disabled: true, data: { menu_button_target: 'button', batch_operation_target: 'dropdown' } }
= t('.operations.other')
#state-menu.dropdown-content.fade-in-down{ data: { menu_button_target: 'menu' } }
#state-menu.dropdown-content.fade-in-down{ data: { menu_button_target: 'menu' }, "aria-labelledby" => "batch_operation_others" }
%ul.dropdown-items
- available_operations[:options][2, available_operations[:options].count].each do |opt|
%li{ 'data-turbo': 'true' }