Duplicate Check
Describe the bug
When ft.Tabs exist in a ft.Container, if ft.Container's alignment parameter is specified, then ft.Tabs will display abnormally.
Code sample
Code
# tabs_issue.py
import flet as ft
def main(page: ft.Page):
page.navigation_bar = ft.NavigationBar(
destinations=[ft.NavigationBarDestination("111", icon=ft.Icons.ABC)]
)
page.add(ft.Card(content=ft.Text("hi")))
page.add(
ft.Container(
content=ft.Tabs(
tabs=[
ft.Tab(
"Like", content=ft.Column(controls=[ft.Text("This is a test")])
)
]
),
margin=10,
padding=10,
alignment=ft.alignment.bottom_left, # will cause wrong behavior, regardless of the type of ft.alignment used.
visible=True,
)
)
if __name__ == "__main__":
ft.app(main)
To reproduce
Run the code and the error is displayed
Expected behavior
When running the code provided, I expect the elements to display normally, i.e. the text should be displayed at least under the tab. However, all elements are all crammed into the top left corner, which is a clear mistake.
Screenshots / Videos
Captures
Operating System
Windows
Operating system details
Windows 11 26100.4946
Flet version
0.28.3
Regression
I'm not sure / I don't know
Suggestions
No response
Logs
Logs
Additional details
No response
Duplicate Check
Describe the bug
When
ft.Tabsexist in aft.Container, ifft.Container's alignment parameter is specified, thenft.Tabswill display abnormally.Code sample
Code
To reproduce
Run the code and the error is displayed
Expected behavior
When running the code provided, I expect the elements to display normally, i.e. the text should be displayed at least under the tab. However, all elements are all crammed into the top left corner, which is a clear mistake.
Screenshots / Videos
Captures
Operating System
Windows
Operating system details
Windows 11 26100.4946
Flet version
0.28.3
Regression
I'm not sure / I don't know
Suggestions
No response
Logs
Logs
[None]Additional details
No response