@limetech/lime-elements 37.1.0-next.86 → 37.1.0-next.88

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,20 @@
1
+ ## [37.1.0-next.88](https://github.com/Lundalogik/lime-elements/compare/v37.1.0-next.87...v37.1.0-next.88) (2024-01-12)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+
7
+ * **menu:** show empty result when no search hits ([81b3e22](https://github.com/Lundalogik/lime-elements/commit/81b3e225f6252aceaccad446e4278dfa1ae7793f))
8
+
9
+ ## [37.1.0-next.87](https://github.com/Lundalogik/lime-elements/compare/v37.1.0-next.86...v37.1.0-next.87) (2024-01-12)
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+
15
+ * **menu:** calculate currentSubMenu even when searching ([6da2af4](https://github.com/Lundalogik/lime-elements/commit/6da2af4a25d039ab2775e451eb36886fda43e635))
16
+ * **menu:** clear search when navigating the menu ([baa4d25](https://github.com/Lundalogik/lime-elements/commit/baa4d25c3e29f92d850c0d1719e94fab21c4c636))
17
+
1
18
  ## [37.1.0-next.86](https://github.com/Lundalogik/lime-elements/compare/v37.1.0-next.85...v37.1.0-next.86) (2024-01-09)
2
19
 
3
20
 
@@ -136,6 +136,7 @@ const Menu = class {
136
136
  this.handleBreadcrumbsSelect = (event) => {
137
137
  if (!event.detail.menuItem) {
138
138
  this.currentSubMenu = null;
139
+ this.clearSearch();
139
140
  this.navigateMenu.emit(null);
140
141
  this.setFocus();
141
142
  return;
@@ -166,9 +167,8 @@ const Menu = class {
166
167
  } }, this.emptyResultMessage));
167
168
  };
168
169
  this.renderMenuList = () => {
169
- var _a;
170
170
  let items = this.visibleItems;
171
- if ((_a = this.searchResults) === null || _a === void 0 ? void 0 : _a.length) {
171
+ if (Array.isArray(this.searchResults) && this.searchValue) {
172
172
  items = this.searchResults;
173
173
  }
174
174
  if (this.loadingSubItems || this.loading) {
@@ -277,6 +277,7 @@ const Menu = class {
277
277
  // If only one step down, go to the root of the menu.
278
278
  // No need to load a sub-menu.
279
279
  this.currentSubMenu = null;
280
+ this.clearSearch();
280
281
  this.navigateMenu.emit(null);
281
282
  this.setFocus();
282
283
  return;
@@ -327,6 +328,7 @@ const Menu = class {
327
328
  this.loadingSubItems = false;
328
329
  if (subItems === null || subItems === void 0 ? void 0 : subItems.length) {
329
330
  this.currentSubMenu = menuItem;
331
+ this.clearSearch();
330
332
  this.navigateMenu.emit(menuItem);
331
333
  this.setFocus();
332
334
  return;
@@ -438,10 +440,6 @@ const Menu = class {
438
440
  }
439
441
  }
440
442
  currentSubMenuWatcher() {
441
- if (this.searchValue) {
442
- this.menuBreadCrumb = [];
443
- return;
444
- }
445
443
  const breadCrumbItems = [];
446
444
  let currentItem = this.currentSubMenu;
447
445
  while (currentItem) {