mirror of
https://github.com/shoelace-style/webawesome.git
synced 2026-01-12 12:09:26 +00:00
simplify initial open behavior
This commit is contained in:
@@ -105,13 +105,13 @@ export default class SlDropdown extends LitElement {
|
||||
}
|
||||
}
|
||||
|
||||
async firstUpdated() {
|
||||
firstUpdated() {
|
||||
this.panel.hidden = !this.open;
|
||||
|
||||
// If the dropdown is visible on init, update its position
|
||||
if (this.open) {
|
||||
await this.updateComplete;
|
||||
this.popup.reposition();
|
||||
this.addOpenListeners();
|
||||
this.popup.active = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user