@gitlab/ui 59.3.0 → 59.3.1
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/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [59.3.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v59.3.0...v59.3.1) (2023-04-05)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **base_dropdown:** conditional chaining to destroy popper ([05cf79e](https://gitlab.com/gitlab-org/gitlab-ui/commit/05cf79e0fdaf55d9403fcdaba062d416294b3815))
|
|
7
|
+
|
|
1
8
|
# [59.3.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v59.2.0...v59.3.0) (2023-04-04)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -200,7 +200,8 @@ var script = {
|
|
|
200
200
|
this.checkToggleFocusable();
|
|
201
201
|
},
|
|
202
202
|
beforeDestroy() {
|
|
203
|
-
|
|
203
|
+
var _this$popper;
|
|
204
|
+
(_this$popper = this.popper) === null || _this$popper === void 0 ? void 0 : _this$popper.destroy();
|
|
204
205
|
},
|
|
205
206
|
methods: {
|
|
206
207
|
checkToggleFocusable() {
|
|
@@ -212,7 +213,7 @@ var script = {
|
|
|
212
213
|
async toggle() {
|
|
213
214
|
this.visible = !this.visible;
|
|
214
215
|
if (this.visible) {
|
|
215
|
-
var _this$
|
|
216
|
+
var _this$popper2;
|
|
216
217
|
/* Initially dropdown is hidden with `display="none"`.
|
|
217
218
|
When `visible` prop is toggled ON, with the `nextTick` we wait for the DOM update -
|
|
218
219
|
dropdown's `display="block"` is set (adding CSS class `show`).
|
|
@@ -224,7 +225,7 @@ var script = {
|
|
|
224
225
|
e.g. set focus.
|
|
225
226
|
*/
|
|
226
227
|
await this.$nextTick();
|
|
227
|
-
await ((_this$
|
|
228
|
+
await ((_this$popper2 = this.popper) === null || _this$popper2 === void 0 ? void 0 : _this$popper2.update());
|
|
228
229
|
this.$emit(GL_DROPDOWN_SHOWN);
|
|
229
230
|
} else {
|
|
230
231
|
this.$emit(GL_DROPDOWN_HIDDEN);
|
package/package.json
CHANGED
|
@@ -92,6 +92,13 @@ describe('base dropdown', () => {
|
|
|
92
92
|
wrapper.destroy();
|
|
93
93
|
expect(destroyPopper).toHaveBeenCalled();
|
|
94
94
|
});
|
|
95
|
+
|
|
96
|
+
it('should not destroy popper instance when component is not initiated', async () => {
|
|
97
|
+
buildWrapper();
|
|
98
|
+
wrapper.destroy();
|
|
99
|
+
await nextTick();
|
|
100
|
+
expect(destroyPopper).not.toHaveBeenCalled();
|
|
101
|
+
});
|
|
95
102
|
});
|
|
96
103
|
|
|
97
104
|
describe('renders content to the default slot', () => {
|