fix(tui): Trigger initial render when start() is called
The demos were not showing any output until user input because: - Components were added before ui.start() was called - addChild calls requestRender() but it returns early if \!isStarted - So no initial render happened until user input triggered one Now ui.start() triggers an initial render if components exist.
This commit is contained in:
@@ -238,6 +238,11 @@ export class TUI extends Container {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Error starting terminal:", error);
|
console.error("Error starting terminal:", error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Trigger initial render if we have components
|
||||||
|
if (this.children.length > 0) {
|
||||||
|
this.requestRender();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stop(): void {
|
stop(): void {
|
||||||
|
|||||||
Reference in New Issue
Block a user