@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 +1 -1
- package/src/ChildSearchPage.jsx +5 -2
package/package.json
CHANGED
package/src/ChildSearchPage.jsx
CHANGED
|
@@ -207,8 +207,11 @@ const ChildSearchPage = ({
|
|
|
207
207
|
getCoreRowModel: getCoreRowModel(),
|
|
208
208
|
getSortedRowModel: getSortedRowModel(),
|
|
209
209
|
state: {
|
|
210
|
-
rowSelection: selectedChildrenState.reduce((acc,
|
|
211
|
-
|
|
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
|
},
|