readytech-ui-library-v2 1.0.101 → 1.0.103

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.
@@ -18494,8 +18494,8 @@ const Ry = /* @__PURE__ */ fe(By, [["render", Ay], ["__scopeId", "data-v-51563f5
18494
18494
  }), My = {
18495
18495
  name: "RtSelectAutocomplete",
18496
18496
  props: {
18497
- text: { type: String, default: "text" },
18498
- label: { type: String, default: "label" },
18497
+ itemTitle: { type: String, default: "text" },
18498
+ itemValue: { type: String, default: "value" },
18499
18499
  chips: { type: Boolean, default: !1 },
18500
18500
  density: {
18501
18501
  type: String,
@@ -18525,7 +18525,9 @@ const Ry = /* @__PURE__ */ fe(By, [["render", Ay], ["__scopeId", "data-v-51563f5
18525
18525
  return this.multiple ? [...this.items] : this.items;
18526
18526
  },
18527
18527
  allSelected() {
18528
- return this.multiple && this.selectedItem.length === this.items.length;
18528
+ if (!this.multiple) return !1;
18529
+ const e = this.items.map((n) => n[this.itemValue]);
18530
+ return this.selectedItem.length === e.length && e.every((n) => this.selectedItem.includes(n));
18529
18531
  }
18530
18532
  },
18531
18533
  watch: {
@@ -18538,7 +18540,7 @@ const Ry = /* @__PURE__ */ fe(By, [["render", Ay], ["__scopeId", "data-v-51563f5
18538
18540
  },
18539
18541
  methods: {
18540
18542
  toggleSelectAll() {
18541
- this.allSelected ? (console.log(this.items.map(item)), this.selectedItem = []) : (console.log(this.items.map((e) => e.value)), this.selectedItem = this.items.map((e) => e.value));
18543
+ this.allSelected ? this.selectedItem = [] : this.selectedItem = this.items.map((e) => e[this.itemValue]);
18542
18544
  },
18543
18545
  onSearch(e) {
18544
18546
  this.$emit("search", e);
@@ -18567,8 +18569,8 @@ function Oy(e, n, t, l, a, i) {
18567
18569
  error: e.error,
18568
18570
  "error-messages": e.errorMessages,
18569
18571
  "menu-props": e.menuProps,
18570
- "item-title": t.text,
18571
- "item-value": e.value,
18572
+ "item-title": t.itemTitle,
18573
+ "item-value": t.itemValue,
18572
18574
  clearable: t.clearable,
18573
18575
  loading: t.loading,
18574
18576
  "search-input": a.searchInput,