@unsource/ui 2.7.4 → 2.7.5

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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "unsource-ui",
3
3
  "configKey": "unsourceUi",
4
- "version": "2.7.4",
4
+ "version": "2.7.5",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -67,7 +67,7 @@
67
67
  </thead>
68
68
  <tbody>
69
69
  <UnTableRow
70
- v-for="(item, index) in items?.filter((e) => !parentKey || !e[parentKey])"
70
+ v-for="(item, index) in items?.filter((e) => !parentKey || parentNotExist(e))"
71
71
  :key="index"
72
72
  v-model="selected"
73
73
  :item="item"
@@ -94,7 +94,7 @@
94
94
 
95
95
  <script setup>
96
96
  import { _at } from "#imports";
97
- const { cols = [], items = [], thClass = "bg-gray-100 border-gray-100", tdClass = "bg-gray-250", textClass = "text-gray-800 font-700 text-xs" } = defineProps({
97
+ const { parentKey, idKey, cols = [], items = [], thClass = "bg-gray-100 border-gray-100", tdClass = "bg-gray-250", textClass = "text-gray-800 font-700 text-xs" } = defineProps({
98
98
  cols: { type: Array, required: false },
99
99
  items: { type: Array, required: false },
100
100
  thClass: { type: String, required: false },
@@ -106,4 +106,5 @@ const { cols = [], items = [], thClass = "bg-gray-100 border-gray-100", tdClass
106
106
  selectable: { type: Boolean, required: false }
107
107
  });
108
108
  const selected = defineModel();
109
+ const parentNotExist = (item) => !item[parentKey] || !items.find((e) => e[idKey || "id"] === item[parentKey]);
109
110
  </script>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unsource/ui",
3
- "version": "2.7.4",
3
+ "version": "2.7.5",
4
4
  "private": false,
5
5
  "description": "nuxt ui kit for unsource env",
6
6
  "repository": "https://github.com/alisa2142/unsource-ui",