@gitlab/ui 64.18.2 → 64.18.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [64.18.3](https://gitlab.com/gitlab-org/gitlab-ui/compare/v64.18.2...v64.18.3) (2023-07-06)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **listbox:** Fix reset button on single select ([8684a7c](https://gitlab.com/gitlab-org/gitlab-ui/commit/8684a7c778ed4517f67ca6191b0a3634f45ca70f))
7
+
1
8
  ## [64.18.2](https://gitlab.com/gitlab-org/gitlab-ui/compare/v64.18.1...v64.18.2) (2023-07-05)
2
9
 
3
10
 
@@ -396,10 +396,8 @@ var script = {
396
396
  return false;
397
397
  }
398
398
 
399
- /**
400
- * hide if no selection
401
- */
402
- if (this.selected.length === 0) {
399
+ // hide if no selection
400
+ if (!this.selected || this.selected.length === 0) {
403
401
  return false;
404
402
  }
405
403
  if (this.multiple) {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Wed, 05 Jul 2023 16:22:25 GMT
3
+ * Generated on Thu, 06 Jul 2023 11:38:55 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Wed, 05 Jul 2023 16:22:25 GMT
3
+ * Generated on Thu, 06 Jul 2023 11:38:55 GMT
4
4
  */
5
5
 
6
6
  :root {
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Wed, 05 Jul 2023 16:22:25 GMT
3
+ * Generated on Thu, 06 Jul 2023 11:38:55 GMT
4
4
  */
5
5
 
6
6
  export const BLACK = "#fff";
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Do not edit directly
3
- * Generated on Wed, 05 Jul 2023 16:22:25 GMT
3
+ * Generated on Thu, 06 Jul 2023 11:38:55 GMT
4
4
  */
5
5
 
6
6
  export const BLACK = "#000";
@@ -1,6 +1,6 @@
1
1
 
2
2
  // Do not edit directly
3
- // Generated on Wed, 05 Jul 2023 16:22:25 GMT
3
+ // Generated on Thu, 06 Jul 2023 11:38:55 GMT
4
4
 
5
5
  $red-950: #fff4f3;
6
6
  $red-900: #fcf1ef;
@@ -1,6 +1,6 @@
1
1
 
2
2
  // Do not edit directly
3
- // Generated on Wed, 05 Jul 2023 16:22:25 GMT
3
+ // Generated on Thu, 06 Jul 2023 11:38:55 GMT
4
4
 
5
5
  $brand-gray-05: #2b2838 !default;
6
6
  $brand-gray-04: #45424d !default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gitlab/ui",
3
- "version": "64.18.2",
3
+ "version": "64.18.3",
4
4
  "description": "GitLab UI Components",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",
@@ -506,6 +506,7 @@ describe('GlCollapsibleListbox', () => {
506
506
  description | props
507
507
  ${'multi-select'} | ${{ multiple: true, selected: [] }}
508
508
  ${'single-select'} | ${{ multiple: false, selected: [] }}
509
+ ${'single-select'} | ${{ multiple: false, selected: undefined }}
509
510
  `('hides the button if the selection is empty in $description mode', ({ props }) => {
510
511
  buildWrapper({
511
512
  headerText: 'Select assignee',
@@ -406,10 +406,8 @@ export default {
406
406
  return false;
407
407
  }
408
408
 
409
- /**
410
- * hide if no selection
411
- */
412
- if (this.selected.length === 0) {
409
+ // hide if no selection
410
+ if (!this.selected || this.selected.length === 0) {
413
411
  return false;
414
412
  }
415
413