@snapdragonsnursery/react-components 1.1.33 → 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.33",
3
+ "version": "1.1.35",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -45,7 +45,8 @@ import {
45
45
  import { cn } from "./lib/utils";
46
46
 
47
47
  const ChildSearchPage = ({
48
- title = "🔧 UPDATED Child Search - Version 1.1.13",
48
+ title = "Child Search",
49
+ searchPlaceholder = "Search by name or child ID...",
49
50
  siteId = null,
50
51
  siteIds = null,
51
52
  sites = null,
@@ -206,8 +207,11 @@ const ChildSearchPage = ({
206
207
  getCoreRowModel: getCoreRowModel(),
207
208
  getSortedRowModel: getSortedRowModel(),
208
209
  state: {
209
- rowSelection: selectedChildrenState.reduce((acc, child, index) => {
210
- 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
+ }
211
215
  return acc;
212
216
  }, {}),
213
217
  },
@@ -436,7 +440,7 @@ const ChildSearchPage = ({
436
440
  <div className="relative mb-4">
437
441
  <Input
438
442
  type="text"
439
- placeholder="🔧 UPDATED: Search by name or child ID... (v1.1.17)"
443
+ placeholder={searchPlaceholder}
440
444
  value={searchTerm}
441
445
  onChange={(e) => setSearchTerm(e.target.value)}
442
446
  className="pl-4"