poe-svelte-ui-lib 1.6.7 → 1.6.8

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.
@@ -27,15 +27,12 @@
27
27
  }: ITableProps<any> = $props()
28
28
 
29
29
  let buffer: any[] = $state([])
30
-
31
30
  export const clearBuffer = () => {
32
31
  buffer = []
33
32
  }
34
33
  /* Сортировка */
35
34
  let sortState: { key: string | null; direction: "asc" | "desc" | null } = { key: null, direction: null }
36
-
37
35
  let isAutoscroll = $state(false)
38
-
39
36
  const logTypeOptions = [
40
37
  { id: crypto.randomUUID(), name: "Error", value: "error", color: "bg-(--red-color)" },
41
38
  { id: crypto.randomUUID(), name: "Warning", value: "warning", color: "bg-(--yellow-color)" },
@@ -118,7 +115,10 @@
118
115
  let existingItem = body[index][key]
119
116
  isDropdownOpen = null
120
117
 
121
- if (existingItem) body[index][key] = [option.value, ...existingItem.filter((opt: string | number) => opt !== option.value)]
118
+ if (existingItem)
119
+ body = [...body].map((row, i) =>
120
+ i === index ? (row = { ...row, [key]: [option.value, ...existingItem.filter((opt: string | number) => opt !== option.value)] }) : row,
121
+ )
122
122
  }
123
123
 
124
124
  let copiedCell = $state({ x: "", y: -1 })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "poe-svelte-ui-lib",
3
- "version": "1.6.7",
3
+ "version": "1.6.8",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "scripts": {