mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-06-04 17:04:32 +08:00
Lexical: Completed out table menu elements, logic pending
This commit is contained in:
@ -24,7 +24,7 @@ export class EditorDropdownButton extends EditorContainerUiElement {
|
||||
constructor(options: EditorDropdownButtonOptions, children: EditorUiElement[]) {
|
||||
super(children);
|
||||
this.childItems = children;
|
||||
this.options = Object.assign(defaultOptions, options);
|
||||
this.options = Object.assign({}, defaultOptions, options);
|
||||
|
||||
if (options.button instanceof EditorButton) {
|
||||
this.button = options.button;
|
||||
@ -61,7 +61,7 @@ export class EditorDropdownButton extends EditorContainerUiElement {
|
||||
class: 'editor-dropdown-menu-container',
|
||||
}, [button, menu]);
|
||||
|
||||
handleDropdown({toggle : button, menu : menu,
|
||||
handleDropdown({toggle: button, menu : menu,
|
||||
showOnHover: this.options.showOnHover,
|
||||
onOpen : () => {
|
||||
this.open = true;
|
||||
|
@ -44,5 +44,5 @@ export function handleDropdown(options: HandleDropdownParams) {
|
||||
toggle.addEventListener('mouseenter', toggleShowing);
|
||||
}
|
||||
|
||||
menu.addEventListener('mouseleave', hide);
|
||||
menu.parentElement?.addEventListener('mouseleave', hide);
|
||||
}
|
Reference in New Issue
Block a user