@ldmjs/ui 1.0.88 → 1.0.90

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.
Files changed (2) hide show
  1. package/dist/index.js +12 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -420,9 +420,8 @@ class BreadcrumbsComponent extends external_vue_property_decorator_.Vue {
420
420
  }
421
421
  }
422
422
  goHome() {
423
- this.go({
424
- route: this.home || { path: '/' },
425
- });
423
+ const home = this.items[0].text === 'home' ? this.items[0] : null;
424
+ this.go(home || { route: this.home || { path: '/' } });
426
425
  }
427
426
  go(item) {
428
427
  if (item.disabled) {
@@ -4863,6 +4862,9 @@ let SelectListBoxComponent = class SelectListBoxComponent extends (0,external_vu
4863
4862
  if (this.hasSelected) {
4864
4863
  this.setSelected([]);
4865
4864
  }
4865
+ if (!this.hasItems && !this.lazyLoad) {
4866
+ this.optionsList = [];
4867
+ }
4866
4868
  return;
4867
4869
  }
4868
4870
  const val = this.toArray(value);
@@ -4890,7 +4892,7 @@ let SelectListBoxComponent = class SelectListBoxComponent extends (0,external_vu
4890
4892
  }
4891
4893
  }
4892
4894
  onItemsChanged() {
4893
- this.onValueChanged(this.modelValue);
4895
+ this.onValueChanged(this.hasItems ? this.modelValue : null);
4894
4896
  }
4895
4897
  onMultiselectChanged(value) {
4896
4898
  this.emitUpdateValue();
@@ -5019,6 +5021,11 @@ let SelectListBoxComponent = class SelectListBoxComponent extends (0,external_vu
5019
5021
  }
5020
5022
  }
5021
5023
  async setSelected(ids) {
5024
+ if (!ids || !ids?.length) {
5025
+ this.selected = [];
5026
+ this.onInput();
5027
+ return;
5028
+ }
5022
5029
  const func = (item) => {
5023
5030
  const id = this.$utils.deepValueGetter(item, this.itemValue);
5024
5031
  return ids.includes(id);
@@ -5074,7 +5081,7 @@ let SelectListBoxComponent = class SelectListBoxComponent extends (0,external_vu
5074
5081
  }
5075
5082
  }
5076
5083
  get itemsIsDefined() {
5077
- return this.items !== undefined;
5084
+ return this.items !== undefined && this.items !== null;
5078
5085
  }
5079
5086
  get hasItems() {
5080
5087
  return Array.isArray(this.items) && this.items.length > 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ldmjs/ui",
3
- "version": "1.0.88",
3
+ "version": "1.0.90",
4
4
  "description": "ldm ui",
5
5
  "main": "dist/index.js",
6
6
  "engines": {