@salesforcedevs/dx-components 1.3.104-alphaa03 → 1.3.104-alphaa04
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -246,9 +246,9 @@ export default class Popover extends LightningElement {
|
|
|
246
246
|
const elements = slot.assignedElements();
|
|
247
247
|
const slotted = elements.length === 0 ? null : elements[0];
|
|
248
248
|
// allows dropdown/select to compose popover
|
|
249
|
-
const slotElement = (
|
|
250
|
-
? slotted.firstChild
|
|
251
|
-
|
|
249
|
+
const slotElement = (
|
|
250
|
+
slotted?.tagName === "SLOT" ? slotted.firstChild : slotted
|
|
251
|
+
) as HTMLElement | null;
|
|
252
252
|
const isWorkToDo =
|
|
253
253
|
slotElement &&
|
|
254
254
|
(!this.control || !slotElement.isSameNode(this.control));
|
|
@@ -286,7 +286,7 @@ export default class Popover extends LightningElement {
|
|
|
286
286
|
}
|
|
287
287
|
}
|
|
288
288
|
|
|
289
|
-
private
|
|
289
|
+
private _setPosition = async () => {
|
|
290
290
|
if (this.popover && this.control) {
|
|
291
291
|
await Promise.resolve();
|
|
292
292
|
const popoverEl = this.popover;
|
|
@@ -310,6 +310,7 @@ export default class Popover extends LightningElement {
|
|
|
310
310
|
|
|
311
311
|
computePosition(this.control, popoverEl, {
|
|
312
312
|
placement: this.placement,
|
|
313
|
+
strategy: "fixed",
|
|
313
314
|
middleware
|
|
314
315
|
}).then(({ x, y, placement, middlewareData }) => {
|
|
315
316
|
Object.assign(popoverEl.style, {
|
|
@@ -349,4 +350,10 @@ export default class Popover extends LightningElement {
|
|
|
349
350
|
});
|
|
350
351
|
}
|
|
351
352
|
};
|
|
353
|
+
public get setPosition() {
|
|
354
|
+
return this._setPosition;
|
|
355
|
+
}
|
|
356
|
+
public set setPosition(value) {
|
|
357
|
+
this._setPosition = value;
|
|
358
|
+
}
|
|
352
359
|
}
|