@jetbrains/ring-ui 4.2.2 → 4.2.3
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.
|
@@ -12,7 +12,11 @@ class SelectLazy {
|
|
|
12
12
|
this.props = props || {};
|
|
13
13
|
this.type = type;
|
|
14
14
|
this.node = container;
|
|
15
|
-
this.
|
|
15
|
+
this.selectInstance = null;
|
|
16
|
+
this.selectRef = node => {
|
|
17
|
+
this.selectInstance = node;
|
|
18
|
+
selectRef(node);
|
|
19
|
+
};
|
|
16
20
|
this._popup = {
|
|
17
21
|
isVisible: angular.noop
|
|
18
22
|
};
|
|
@@ -65,6 +69,8 @@ class SelectLazy {
|
|
|
65
69
|
this.detachEvents();
|
|
66
70
|
if (this.type === 'dropdown') {
|
|
67
71
|
render(this.reactSelect, this.container);
|
|
72
|
+
// Hack for React17, where click event is not triggered on just rendered Select node
|
|
73
|
+
this.selectInstance?._openPopupIfClosed?.();
|
|
68
74
|
} else {
|
|
69
75
|
hydrate(this.reactSelect, this.container);
|
|
70
76
|
}
|
|
@@ -95,7 +95,13 @@ class SelectLazy {
|
|
|
95
95
|
this.props = props || {};
|
|
96
96
|
this.type = type;
|
|
97
97
|
this.node = container;
|
|
98
|
-
this.
|
|
98
|
+
this.selectInstance = null;
|
|
99
|
+
|
|
100
|
+
this.selectRef = node => {
|
|
101
|
+
this.selectInstance = node;
|
|
102
|
+
selectRef(node);
|
|
103
|
+
};
|
|
104
|
+
|
|
99
105
|
this._popup = {
|
|
100
106
|
isVisible: angular.noop
|
|
101
107
|
};
|
|
@@ -148,7 +154,11 @@ class SelectLazy {
|
|
|
148
154
|
this.detachEvents();
|
|
149
155
|
|
|
150
156
|
if (this.type === 'dropdown') {
|
|
151
|
-
|
|
157
|
+
var _this$selectInstance, _this$selectInstance$;
|
|
158
|
+
|
|
159
|
+
render(this.reactSelect, this.container); // Hack for React17, where click event is not triggered on just rendered Select node
|
|
160
|
+
|
|
161
|
+
(_this$selectInstance = this.selectInstance) === null || _this$selectInstance === void 0 ? void 0 : (_this$selectInstance$ = _this$selectInstance._openPopupIfClosed) === null || _this$selectInstance$ === void 0 ? void 0 : _this$selectInstance$.call(_this$selectInstance);
|
|
152
162
|
} else {
|
|
153
163
|
hydrate(this.reactSelect, this.container);
|
|
154
164
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetbrains/ring-ui",
|
|
3
|
-
"version": "4.2.
|
|
3
|
+
"version": "4.2.3",
|
|
4
4
|
"description": "JetBrains UI library",
|
|
5
5
|
"author": "JetBrains",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -221,5 +221,5 @@
|
|
|
221
221
|
"node": ">=7.4",
|
|
222
222
|
"npm": ">=6.0.0"
|
|
223
223
|
},
|
|
224
|
-
"gitHead": "
|
|
224
|
+
"gitHead": "9d293b7a0089eab3fbadaffb55a1ede32367c2df"
|
|
225
225
|
}
|