@dloizides/ui-layout 1.59.0 → 1.60.1
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/CHANGELOG.md +8 -0
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3482,6 +3482,7 @@ var SectionIndexLayout = ({
|
|
|
3482
3482
|
indexHeading,
|
|
3483
3483
|
itemHint,
|
|
3484
3484
|
initialKey,
|
|
3485
|
+
collapsedKey,
|
|
3485
3486
|
breakpoint = SECTION_INDEX_BREAKPOINT,
|
|
3486
3487
|
density = "comfortable" /* Comfortable */,
|
|
3487
3488
|
stickyIndex = false,
|
|
@@ -3491,8 +3492,8 @@ var SectionIndexLayout = ({
|
|
|
3491
3492
|
testID = "section-index"
|
|
3492
3493
|
}) => {
|
|
3493
3494
|
const wide = useIsWideViewport(breakpoint);
|
|
3494
|
-
const [picked, setPicked] = useState(
|
|
3495
|
-
const activeKey = resolveActiveKey(sections, picked);
|
|
3495
|
+
const [picked, setPicked] = useState(void 0);
|
|
3496
|
+
const activeKey = resolveActiveKey(sections, picked ?? (wide ? initialKey : collapsedKey ?? initialKey));
|
|
3496
3497
|
const gap = { gap: density === "dense" /* Dense */ ? DENSE_GAP : COMFORTABLE_GAP };
|
|
3497
3498
|
if (sections.length < 2) return /* @__PURE__ */ jsx(View, { testID, children: sections[0]?.content });
|
|
3498
3499
|
if (!wide) {
|