Adapt use of createDropdown for editor buttons

This commit is contained in:
Henrik Giesel 2021-06-22 17:27:25 +02:00
parent 76b005991e
commit cedbc35850
2 changed files with 8 additions and 2 deletions

View File

@ -65,7 +65,10 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
<ButtonGroupItem>
<WithDropdownMenu let:createDropdown let:menuId>
<OnlyEditable let:disabled>
<IconButton {disabled} on:mount={createDropdown}>
<IconButton
{disabled}
on:mount={(event) => createDropdown(event.detail.button)}
>
{@html listOptionsIcon}
</IconButton>
</OnlyEditable>

View File

@ -88,7 +88,10 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
<ButtonGroupItem>
<WithDropdownMenu let:createDropdown let:menuId>
<WithContext key={disabledKey} let:context={disabled}>
<IconButton {disabled} on:mount={createDropdown}>
<IconButton
{disabled}
on:mount={(event) => createDropdown(event.detail.button)}
>
{@html functionIcon}
</IconButton>
</WithContext>