@snapdragonsnursery/react-components 1.1.34 → 1.1.35

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@snapdragonsnursery/react-components",
3
- "version": "1.1.34",
3
+ "version": "1.1.35",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -207,8 +207,11 @@ const ChildSearchPage = ({
207
207
  getCoreRowModel: getCoreRowModel(),
208
208
  getSortedRowModel: getSortedRowModel(),
209
209
  state: {
210
- rowSelection: selectedChildrenState.reduce((acc, child, index) => {
211
- acc[index] = true;
210
+ rowSelection: selectedChildrenState.reduce((acc, selectedChild) => {
211
+ const rowIndex = children.findIndex(child => child.child_id === selectedChild.child_id);
212
+ if (rowIndex !== -1) {
213
+ acc[rowIndex] = true;
214
+ }
212
215
  return acc;
213
216
  }, {}),
214
217
  },