kopia lustrzana https://github.com/shoelace-style/shoelace
fixes #443
rodzic
3cff627b22
commit
d7bf0bd653
|
@ -6,6 +6,10 @@ Components with the <sl-badge type="warning" pill>Experimental</sl-badge> badge
|
|||
|
||||
_During the beta period, these restrictions may be relaxed in the event of a mission-critical bug._ 🐛
|
||||
|
||||
## Next
|
||||
|
||||
- Fixed a bug where removing `sl-dropdown` from the DOM and adding it back destroyed the popover reference [#443](https://github.com/shoelace-style/shoelace/issues/443)
|
||||
|
||||
## 2.0.0-beta.40
|
||||
|
||||
- 🚨 BREAKING: renamed `sl-responsive-embed` to `sl-responsive-media` and added support for images and videos [#436](https://github.com/shoelace-style/shoelace/issues/436)
|
||||
|
|
|
@ -95,24 +95,27 @@ export default class SlDropdown extends LitElement {
|
|||
if (!this.containingElement) {
|
||||
this.containingElement = this;
|
||||
}
|
||||
|
||||
// Create the popover after render
|
||||
this.updateComplete.then(() => {
|
||||
this.popover = new Popover(this.trigger, this.positioner, {
|
||||
strategy: this.hoist ? 'fixed' : 'absolute',
|
||||
placement: this.placement,
|
||||
distance: this.distance,
|
||||
skidding: this.skidding,
|
||||
transitionElement: this.panel,
|
||||
onAfterHide: () => this.slAfterHide.emit(),
|
||||
onAfterShow: () => this.slAfterShow.emit(),
|
||||
onTransitionEnd: () => {
|
||||
if (!this.open) {
|
||||
this.panel.scrollTop = 0;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
firstUpdated() {
|
||||
this.popover = new Popover(this.trigger, this.positioner, {
|
||||
strategy: this.hoist ? 'fixed' : 'absolute',
|
||||
placement: this.placement,
|
||||
distance: this.distance,
|
||||
skidding: this.skidding,
|
||||
transitionElement: this.panel,
|
||||
onAfterHide: () => this.slAfterHide.emit(),
|
||||
onAfterShow: () => this.slAfterShow.emit(),
|
||||
onTransitionEnd: () => {
|
||||
if (!this.open) {
|
||||
this.panel.scrollTop = 0;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// Show on init if open
|
||||
if (this.open) {
|
||||
this.show();
|
||||
|
|
Ładowanie…
Reference in New Issue