-
Notifications
You must be signed in to change notification settings - Fork 815
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow enabling/disabling tab via tab pane. #3152
Conversation
This allows one to use the 'disabled' attribute in tab panes to enable/disable a tab, which is particularly useful if you want to instantiate a tab that starts off as disabled, as seen in #3149.
return self.tab_pane | ||
|
||
@dataclass | ||
class Enabled(Message): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might it not make sense to give this and TabPane.Disabled
a common parent class (adds to the utility of @on
for example)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm honestly not fussed either way. I'll add it if you ask for it, otherwise I'll just merge this PR. 🤷
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It feels like it would be more in keeping with where we're slowly heading with multiple messages on a widget (where appropriate); but it sure wasn't a "must do won't approve or else". ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Point taken. 9ef644c.
This fixes #3149.