@jsenv/navi 0.29.365 → 0.29.366

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.
@@ -64090,8 +64090,8 @@ const PickerCustom = props => {
64090
64090
  // before computing popupId below, so two Pickers without an explicit id never collide.
64091
64091
  // Captured before the fallback chain below overwrites props.id — needed to
64092
64092
  // know whether the id actually came from the caller (stable) or from
64093
- // useId()/ControlIdContext (not guaranteed stable across a reload), see
64094
- // pickerNavType below.
64093
+ // useId()/ControlIdContext (a generated id names one mount: a reload, or a
64094
+ // return to this page, generates another), see pickerNavType below.
64095
64095
  const hasExplicitId = Boolean(props.id);
64096
64096
  const idDefault = useId();
64097
64097
  const controlId = useContext(ControlIdContext);
@@ -64167,10 +64167,12 @@ const PickerCustom = props => {
64167
64167
  // pushes a history entry so the back button closes it. Every other case
64168
64168
  // (popover mode, or a dialog whose id was auto-generated via useId()/
64169
64169
  // ControlIdContext) replaces the current history state instead — a
64170
- // generated id isn't stable across a reload, so pushing it would either
64171
- // silently drop the entry or, worse, collide with a different
64172
- // component's own generated id (see useNavState's own fallback for the
64173
- // same concern, applied here proactively for the id we control).
64170
+ // generated id names one mount, so pushing it would either leave an entry
64171
+ // nothing reads or, worse, collide with a different component's own
64172
+ // generated id (see useNavState's own fallback for the same concern,
64173
+ // applied here proactively for the id we control). What a generated id
64174
+ // costs either way: the state is written, and the mount coming back to
64175
+ // the page (or a reload) finds it under a key it does not have.
64174
64176
  const pickerNavType = mode === "dialog" && hasExplicitId ? "push" : "replace";
64175
64177
  const [expanded, enterExpanded, leaveExpanded] = useNavState(popupId, {
64176
64178
  type: pickerNavType,