1

Creating a Toolbarbutton which needs a selected list item for dropdown:

$childBar->standardButton('delete')->icon('icon-arrow-right')->text('delete')->task('delete')->listCheck(true);

or a simple button:

$bar = Toolbar::getInstance('toolbar');
$bar->appendButton('Standard', 'delete', 'delete', 'remove', true);

Is there a way to do the same for a modal button like this, that also only get activated with a selected list item, so it also gets the list-selection class?.

ToolbarHelper::modal('myModal', 'icon-pie', 'myModal');

1 Answer 1

1

Use popup button:

$bar->popupButton('modalButton', 'myModal')
    ->icon('icon-pie')
    ->selector('myModal')
    ->listCheck(true);
1
  • Thanks. Was searching for the modalButton.
    – maidan
    Oct 1, 2022 at 17:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.