lupine.components 1.1.6 → 1.1.7
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
|
@@ -20,17 +20,17 @@ export class HtmlVar implements HtmlVarResult {
|
|
|
20
20
|
// in case new resolve is created while updating
|
|
21
21
|
const res = this.resolve;
|
|
22
22
|
if (this._dirty) {
|
|
23
|
-
await this.update(
|
|
23
|
+
await this.update();
|
|
24
24
|
}
|
|
25
25
|
res();
|
|
26
26
|
},
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
private async update(
|
|
30
|
+
private async update(): Promise<void> {
|
|
31
|
+
await this._ref.mountInnerComponent!(this._value);
|
|
31
32
|
this._dirty = false;
|
|
32
33
|
this._value = '';
|
|
33
|
-
await this._ref.mountInnerComponent!(value);
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
// need to wait before use ref.current
|
|
@@ -40,14 +40,17 @@ export class HtmlVar implements HtmlVarResult {
|
|
|
40
40
|
|
|
41
41
|
set value(value: string | VNode<any>) {
|
|
42
42
|
this._value = value;
|
|
43
|
-
if (this._dirty
|
|
43
|
+
if (this._dirty) {
|
|
44
44
|
return;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
this._dirty = true;
|
|
48
|
+
if (!this._ref.current) {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
48
51
|
this.promise = new Promise<void>(async (res) => {
|
|
49
52
|
this.resolve = res;
|
|
50
|
-
await this.update(
|
|
53
|
+
await this.update();
|
|
51
54
|
this.resolve();
|
|
52
55
|
});
|
|
53
56
|
}
|