Replies: 1 comment 3 replies
-
You can only query the DOM once it has been mounted, not in the compose method. How about this? def compose(self) -> ComposeResult:
with Vertical(id="page"):
yield from super().compose() |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I want to create king of template for screens. It has header, footer, other main space is a horizontal container:
The vertical container has:
So, on every child screen I just want to compose only inside container id=page. In compose method I write 'yield from super().compose()', but I can't get container with 'self.query_one('#page', Container)', the error is "NoMatches: No nodes match '#page' on My screen()"
Beta Was this translation helpful? Give feedback.
All reactions