From bbb0e739b6a9f08b07dacfeb066f4287efd47698 Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Sun, 1 Sep 2019 15:08:58 -0700 Subject: [PATCH] Use the first layout when rendering the child of a container --- modern/src/App.js | 1 + modern/src/runtime/Container.ts | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/modern/src/App.js b/modern/src/App.js index a778c48c..d008aff8 100644 --- a/modern/src/App.js +++ b/modern/src/App.js @@ -174,6 +174,7 @@ function Container(props) { if (default_visible !== undefined) { style.display = default_visible ? "block" : "none"; } + return (
{children} diff --git a/modern/src/runtime/Container.ts b/modern/src/runtime/Container.ts index cb6c9bef..310ff7f7 100644 --- a/modern/src/runtime/Container.ts +++ b/modern/src/runtime/Container.ts @@ -96,7 +96,10 @@ class Container extends MakiObject { getcurlayout() { unimplementedWarning("getcurlayout"); - return; + // TODO: For now we just always show the first layout. I think that's the default. + return this.children.find(childNode => { + return childNode.getclassname() === "Layout"; + }); } }