Skip to content

Commit fd89bd7

Browse files
author
tong.hau
committed
chore(tooltip): update strategy to fixed position
1 parent e74401b commit fd89bd7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/Tooltip/sgds-tooltip.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { html } from "lit";
22
import { property, queryAssignedElements, state } from "lit/decorators.js";
33
import { Ref, createRef, ref } from "lit/directives/ref.js";
4-
import { computePosition, offset, flip, shift, hide, autoUpdate } from "@floating-ui/dom";
4+
import { computePosition, offset, flip, shift, hide, autoUpdate, Strategy } from "@floating-ui/dom";
55
import SgdsElement from "../../base/sgds-element";
66
import tooltipStyle from "./tooltip.css";
77

@@ -95,6 +95,7 @@ export class SgdsTooltip extends SgdsElement {
9595
this._tooltipTargetElements[0],
9696
this._tooltipBubble.value,
9797
{
98+
strategy: "fixed" as Strategy,
9899
placement: this.placement,
99100
middleware: [offset(8), flip(), shift(), hide()]
100101
}

0 commit comments

Comments
 (0)