@invopop/popui 0.1.90 → 0.1.91

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.
@@ -154,9 +154,12 @@
154
154
  // Track selection changes
155
155
  $effect(() => {
156
156
  if (onSelectionChange) {
157
- const selectedRows = Object.keys(rowSelection)
158
- .filter((key) => rowSelection[key])
159
- .map((key) => data[parseInt(key)])
157
+ const selectedKeys = Object.keys(rowSelection).filter((key) => rowSelection[key])
158
+ const selectedRows = getRowId
159
+ ? selectedKeys
160
+ .map((key) => data.find((row, idx) => getRowId(row, idx) === key))
161
+ .filter((row): row is TData => row !== undefined)
162
+ : selectedKeys.map((key) => data[parseInt(key)])
160
163
  onSelectionChange(selectedRows)
161
164
  }
162
165
  })
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@invopop/popui",
3
3
  "license": "MIT",
4
- "version": "0.1.90",
4
+ "version": "0.1.91",
5
5
  "repository": {
6
6
  "url": "https://github.com/invopop/popui"
7
7
  },