Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/frank-pumas-fail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nodesecure/documentation-ui": patch
---

Add missing setTimeout to header.ts component
10 changes: 5 additions & 5 deletions public/components/wiki/wiki.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ export class Wiki {
".open-button"
);

const { container, header, navigation } = documentationUI.render(
{ preCacheAllFlags: true }
);

const documentationRenderContainer = this.documentationRootElement.querySelector(
".documentation-render-container"
);
for (const node of documentationRenderContainer.childNodes) {
node.remove();
}
documentationRenderContainer.appendChild(container);

const { header, navigation } = documentationUI.render(
documentationRenderContainer,
{ prefetch: true }
);

/** @type {documentationUI.Header} */
this.header = header;
Expand Down
2 changes: 1 addition & 1 deletion workspaces/documentation-ui/src/components/header.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export class Header {
this.active === null &&
(this.defaultName === null || this.defaultName === name)
) {
this.setNewActiveView(name);
setTimeout(() => this.setNewActiveView(name), 1);
}

liElement.addEventListener(
Expand Down
Loading