@gitlab/ui 86.9.0 → 86.9.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
+ ## [86.9.1](https://gitlab.com/gitlab-org/gitlab-ui/compare/v86.9.0...v86.9.1) (2024-07-11)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **disclosure-dropdown:** correctly close on item selection ([9e21f53](https://gitlab.com/gitlab-org/gitlab-ui/commit/9e21f5385860862a520f8ae72d58721da6433d1c))
7
+
1
8
  # [86.9.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v86.8.0...v86.9.0) (2024-07-11)
2
9
 
3
10
 
@@ -321,12 +321,16 @@ var script = {
321
321
  this.$refs.baseDropdown.closeAndFocus();
322
322
  },
323
323
  handleAction(action) {
324
- /**
325
- * Emitted when one of disclosure dropdown items is clicked
326
- *
327
- * @event action
328
- */
329
- this.$emit('action', action);
324
+ // See https://gitlab.com/gitlab-org/gitlab-ui/-/merge_requests/4376 for
325
+ // detailed explanation why we need requestAnimationFrame
326
+ window.requestAnimationFrame(() => {
327
+ /**
328
+ * Emitted when one of disclosure dropdown items is clicked
329
+ *
330
+ * @event action
331
+ */
332
+ this.$emit('action', action);
333
+ });
330
334
  },
331
335
  handleAutoClose(e) {
332
336
  if (this.autoClose && e.target.closest(ITEM_SELECTOR) && e.target.closest(DROPDOWN_SELECTOR) === this.$refs.baseDropdown.$el) {
@@ -31,6 +31,13 @@ const mockItems = [{
31
31
  'data-method': 'put'
32
32
  }
33
33
  }];
34
+ const mockButtons = [{
35
+ text: 'Checks'
36
+ }, {
37
+ text: 'Projects'
38
+ }, {
39
+ text: 'Standards'
40
+ }];
34
41
  const mockItemsCustomItem = [{
35
42
  text: 'Assigned to you',
36
43
  href: 'https://gitlab.com/dashboard/merge_requests?assignee_username=root',
@@ -150,4 +157,4 @@ const mockProfileGroups = [{
150
157
  }]
151
158
  }];
152
159
 
153
- export { mockGroups, mockGroupsCustomItem, mockItems, mockItemsCustomItem, mockProfileGroups };
160
+ export { mockButtons, mockGroups, mockGroupsCustomItem, mockItems, mockItemsCustomItem, mockProfileGroups };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "86.9.0",
3
+ "version": "86.9.1",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -342,12 +342,16 @@ export default {
342
342
  this.$refs.baseDropdown.closeAndFocus();
343
343
  },
344
344
  handleAction(action) {
345
- /**
346
- * Emitted when one of disclosure dropdown items is clicked
347
- *
348
- * @event action
349
- */
350
- this.$emit('action', action);
345
+ // See https://gitlab.com/gitlab-org/gitlab-ui/-/merge_requests/4376 for
346
+ // detailed explanation why we need requestAnimationFrame
347
+ window.requestAnimationFrame(() => {
348
+ /**
349
+ * Emitted when one of disclosure dropdown items is clicked
350
+ *
351
+ * @event action
352
+ */
353
+ this.$emit('action', action);
354
+ });
351
355
  },
352
356
  handleAutoClose(e) {
353
357
  if (
@@ -37,6 +37,18 @@ export const mockItems = [
37
37
  },
38
38
  ];
39
39
 
40
+ export const mockButtons = [
41
+ {
42
+ text: 'Checks',
43
+ },
44
+ {
45
+ text: 'Projects',
46
+ },
47
+ {
48
+ text: 'Standards',
49
+ },
50
+ ];
51
+
40
52
  export const mockItemsCustomItem = [
41
53
  {
42
54
  text: 'Assigned to you',