You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It doesn't seem like self.app.show_login=False will trigger compose() to re-run. I might be thinking about this wrong, and while Screen is an option here, it doesn't give me the right functionality I'm looking for because CustomContainerSlowToLoadRequiresLogin is going to need a valid access token that comes from the LoginForm (e.g. username/password) before it can run. The way I set this up is to have CustomContainerSlowToLoadRequiresLogin do something with the access token on_mount because it only needs to run once to initialize its data, and doesn't need to make anymore API calls after that.
Is there something in Textual that allows this design pattern, or how can I rework my logic to make it work?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
It seems if one tries to do something reactive like below
It doesn't seem like
self.app.show_login=False
will triggercompose()
to re-run. I might be thinking about this wrong, and whileScreen
is an option here, it doesn't give me the right functionality I'm looking for becauseCustomContainerSlowToLoadRequiresLogin
is going to need a valid access token that comes from theLoginForm
(e.g. username/password) before it can run. The way I set this up is to haveCustomContainerSlowToLoadRequiresLogin
do something with the access tokenon_mount
because it only needs to run once to initialize its data, and doesn't need to make anymore API calls after that.Is there something in Textual that allows this design pattern, or how can I rework my logic to make it work?
Beta Was this translation helpful? Give feedback.
All reactions