-
Notifications
You must be signed in to change notification settings - Fork 17
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
Adding support to replace drawer and content within AppLayout. #82
Conversation
AppLayout.kt functions migrated to DummyHasComponents
karibu-dsl/src/main/kotlin/com/github/mvysny/karibudsl/v10/AppLayout.kt
Outdated
Show resolved
Hide resolved
karibu-dsl/src/main/kotlin/com/github/mvysny/karibudsl/v10/AppLayout.kt
Outdated
Show resolved
Hide resolved
karibu-dsl/src/main/kotlin/com/github/mvysny/karibudsl/v10/VaadinComponents.kt
Outdated
Show resolved
Hide resolved
karibu-dsl/src/main/kotlin/com/github/mvysny/karibudsl/v10/VaadinDsl.kt
Outdated
Show resolved
Hide resolved
componentColumn, Scroller.content migrated to provideSingleComponent.
instead of |
@mvysny |
Sure! The componentColumn({
if (canEdit(it)) {
button("Edit") { ... }
}
}) The TabSheet.tab is similar: it's possible to create a tab without the component body; at least I think - if that's not the case, then we should definitely use |
Now it's clear. Thank you for explanation! |
Purpose: To have several drawers and contents for AppLayout and switch between them.
For example, navbar contains several tabs.
When a tab is selected, it set its specific drawer and re-populates AppLayout content.
If a tab doesn't have a drawer, removeDrawer() can be called to by its own to clear the previous assigned drawer.
From AppLayout.content the restriction has been removed.
check([email protected] == null) { "The content has already been initialized!" }