We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8502d88 commit bb5e53aCopy full SHA for bb5e53a
packages/chili-ui/src/viewport/flyout/flyout.ts
@@ -33,13 +33,16 @@ export class Flyout extends HTMLElement {
33
private readonly showTip = (dom: HTMLElement | { level: MessageType; msg: string }) => {
34
if (dom instanceof HTMLElement) {
35
this._tip?.remove();
36
+
37
this._tip = dom;
38
this.append(this._tip);
- } else if (this._tip === undefined) {
39
- this._tip = new Tip(dom.msg, dom.level);
40
- this.append(this._tip);
41
} else if (this._tip instanceof Tip) {
42
this._tip.set(dom.msg, dom.level);
+ } else {
+ this._tip?.remove();
43
44
+ this._tip = new Tip(dom.msg, dom.level);
45
+ this.append(this._tip);
46
}
47
};
48
0 commit comments