mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 07:53:39 +01:00
Et2DropdownButton make position adjustable by passing placement attribute on to sl-dropdown
This commit is contained in:
parent
2cfab31d19
commit
9d8224453e
@ -15,6 +15,7 @@ import {Et2WidgetWithSelectMixin} from "../Et2Select/Et2WidgetWithSelectMixin";
|
||||
import {SelectOption} from "../Et2Select/FindSelectOptions";
|
||||
import shoelace from "../Styles/shoelace";
|
||||
import {ifDefined} from "lit/directives/if-defined.js";
|
||||
import {property} from "lit/decorators/property.js";
|
||||
|
||||
/**
|
||||
* A split button - a button with a dropdown list
|
||||
@ -75,6 +76,9 @@ export class Et2DropdownButton extends Et2WidgetWithSelectMixin(LitElement)
|
||||
};
|
||||
}
|
||||
|
||||
@property()
|
||||
placement:string = "bottom-end";
|
||||
|
||||
// Make sure imports stay
|
||||
private _group : SlButtonGroup;
|
||||
private _dropdow : SlDropdown;
|
||||
@ -115,7 +119,7 @@ export class Et2DropdownButton extends Et2WidgetWithSelectMixin(LitElement)
|
||||
>
|
||||
${this.label}
|
||||
</sl-button>
|
||||
<sl-dropdown placement="bottom-end" hoist part="dropdown">
|
||||
<sl-dropdown placement=${this.placement} hoist part="dropdown">
|
||||
<slot name="trigger" slot="trigger">
|
||||
<sl-button part="trigger" size="${egwIsMobile() ? "large" : "medium"}" slot="trigger" caret
|
||||
?disabled=${this.disabled}></sl-button>
|
||||
|
Loading…
Reference in New Issue
Block a user