@vaadin/menu-bar 22.0.11 → 22.0.14

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vaadin/menu-bar",
3
- "version": "22.0.11",
3
+ "version": "22.0.14",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -35,18 +35,18 @@
35
35
  "@open-wc/dedupe-mixin": "^1.3.0",
36
36
  "@polymer/iron-resizable-behavior": "^3.0.0",
37
37
  "@polymer/polymer": "^3.0.0",
38
- "@vaadin/button": "^22.0.11",
39
- "@vaadin/component-base": "^22.0.11",
40
- "@vaadin/vaadin-context-menu": "^22.0.11",
41
- "@vaadin/vaadin-lumo-styles": "^22.0.11",
42
- "@vaadin/vaadin-material-styles": "^22.0.11",
43
- "@vaadin/vaadin-themable-mixin": "^22.0.11"
38
+ "@vaadin/button": "^22.0.14",
39
+ "@vaadin/component-base": "^22.0.14",
40
+ "@vaadin/vaadin-context-menu": "^22.0.14",
41
+ "@vaadin/vaadin-lumo-styles": "^22.0.14",
42
+ "@vaadin/vaadin-material-styles": "^22.0.14",
43
+ "@vaadin/vaadin-themable-mixin": "^22.0.14"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@esm-bundle/chai": "^4.3.4",
47
- "@vaadin/icon": "^22.0.11",
47
+ "@vaadin/icon": "^22.0.14",
48
48
  "@vaadin/testing-helpers": "^0.3.2",
49
49
  "sinon": "^9.2.1"
50
50
  },
51
- "gitHead": "a905b1ef7af885ce5536646e818fe76574407237"
51
+ "gitHead": "62419e3f8f41fe9dc4f0bce5e1717b16828459b6"
52
52
  }
@@ -111,8 +111,13 @@ export const ButtonsMixin = (superClass) =>
111
111
  item.classList.remove('vaadin-menu-item');
112
112
  }
113
113
  }
114
- this._overflow.item = { children: [] };
115
- this._hasOverflow = false;
114
+ this.__updateOverflow([]);
115
+ }
116
+
117
+ /** @private */
118
+ __updateOverflow(items) {
119
+ this._overflow.item = { children: items };
120
+ this._hasOverflow = items.length > 0;
116
121
  }
117
122
 
118
123
  /** @private */
@@ -143,9 +148,8 @@ export const ButtonsMixin = (superClass) =>
143
148
  // save width for buttons with component
144
149
  btn.style.width = btnStyle.width;
145
150
  }
146
- overflow.item = {
147
- children: buttons.filter((b, idx) => idx >= i).map((b) => b.item)
148
- };
151
+ const items = buttons.filter((_, idx) => idx >= i).map((b) => b.item);
152
+ this.__updateOverflow(items);
149
153
  }
150
154
  }
151
155