@nice-code/state 0.4.8 → 0.4.9

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.
@@ -1510,8 +1510,8 @@ function ChangeList({
1510
1510
  children: groups.map((group) => /* @__PURE__ */ jsxDEV6(ChangeRow, {
1511
1511
  change: group.representative,
1512
1512
  count: group.count,
1513
- selected: group.representative.cuid === selectedCuid,
1514
- onClick: () => onSelect(group.representative.cuid),
1513
+ selected: group.oldest.cuid === selectedCuid,
1514
+ onClick: () => onSelect(group.oldest.cuid),
1515
1515
  showStore
1516
1516
  }, group.oldest.cuid, false, undefined, this))
1517
1517
  }, undefined, false, undefined, this);
@@ -2100,7 +2100,7 @@ function NiceStateDevtools_Panel({
2100
2100
  const selectedChange = useMemo(() => {
2101
2101
  if (selectedChangeCuid == null)
2102
2102
  return null;
2103
- const group = groups.find((g) => g.representative.cuid === selectedChangeCuid);
2103
+ const group = groups.find((g) => g.oldest.cuid === selectedChangeCuid);
2104
2104
  if (group == null)
2105
2105
  return changes.find((c) => c.cuid === selectedChangeCuid) ?? null;
2106
2106
  if (group.count > 1) {
@@ -2112,7 +2112,7 @@ function NiceStateDevtools_Panel({
2112
2112
  }
2113
2113
  return group.representative;
2114
2114
  }, [selectedChangeCuid, groups, changes]);
2115
- const latestCuid = filteredChanges.length > 0 ? filteredChanges[0].cuid : null;
2115
+ const latestCuid = groups.length > 0 ? groups[0].oldest.cuid : null;
2116
2116
  useEffect2(() => {
2117
2117
  if (stayOnLatest && latestCuid != null)
2118
2118
  setSelectedChangeCuid(latestCuid);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nice-code/state",
3
- "version": "0.4.8",
3
+ "version": "0.4.9",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "exports": {