@tekkare/auriga 0.1.95 → 0.1.97

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/dist/module.json CHANGED
@@ -4,5 +4,5 @@
4
4
  "compatibility": {
5
5
  "nuxt": "^3.0.0"
6
6
  },
7
- "version": "0.1.95"
7
+ "version": "0.1.97"
8
8
  }
@@ -358,6 +358,13 @@ export default defineComponent({
358
358
  if (props.preselection_all) {
359
359
  add_all();
360
360
  } else if (props.default_select && props.default_select.length > 0) {
361
+ if (!element_table_copy.value.some(
362
+ (a) => props.default_select.includes(a)
363
+ )) {
364
+ element_table_copy.value = element_table_copy.value.concat(
365
+ props.default_select
366
+ );
367
+ }
361
368
  selected_items.value = props.default_select;
362
369
  }
363
370
  }
@@ -456,7 +463,7 @@ export default defineComponent({
456
463
  }
457
464
  const filterName = computed(() => {
458
465
  if (!props.multiple_columns) {
459
- if (searchName.value !== null) {
466
+ if (searchName.value.length > 0) {
460
467
  if (searchName.value.includes(" ")) {
461
468
  return element_table_copy.value.filter(
462
469
  (element) => checkIfContainsValue(
@@ -473,7 +480,7 @@ export default defineComponent({
473
480
  } else {
474
481
  let selectTable = [];
475
482
  const finalTable = [];
476
- if (searchName.value !== null) {
483
+ if (searchName.value.length > 0) {
477
484
  selectTable = [
478
485
  ...new Set(
479
486
  element_table_copy.value.filter(
@@ -601,6 +608,9 @@ export default defineComponent({
601
608
  selected_all.value = false;
602
609
  if (!props.options_disable.includes(index)) {
603
610
  selected_items.value.splice(selected_items.value.indexOf(element), 1);
611
+ if (!props.element_table.includes(element)) {
612
+ element_table_copy.value.splice(index, 1);
613
+ }
604
614
  emit(
605
615
  "changeElement",
606
616
  selected_items.value.map((a) => a)
@@ -801,7 +811,8 @@ export default defineComponent({
801
811
  getEmptyMsg,
802
812
  getLoaderText,
803
813
  getPlaceholder,
804
- getEmptyContentMsg
814
+ getEmptyContentMsg,
815
+ element_table_copy
805
816
  };
806
817
  }
807
818
  });
@@ -141,6 +141,7 @@ declare const _default: import("vue").DefineComponent<{
141
141
  getLoaderText: import("vue").ComputedRef<string[]>;
142
142
  getPlaceholder: import("vue").ComputedRef<string>;
143
143
  getEmptyContentMsg: import("vue").ComputedRef<string>;
144
+ element_table_copy: import("vue").Ref<any[]>;
144
145
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("onClose" | "changeElement" | "update:Selection" | "changeInputValue")[], "onClose" | "changeElement" | "update:Selection" | "changeInputValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
145
146
  element_table: {
146
147
  type: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tekkare/auriga",
3
- "version": "0.1.95",
3
+ "version": "0.1.97",
4
4
  "description": "Aurgia is a UI kit developped by Tekkare",
5
5
  "license": "MIT",
6
6
  "type": "module",