bug: TextField does not resize vertically

Đang mở
#6,915 2 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@ndonkoHenri đang làm issue này rồi.

Từ ngày 4/10/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

bug
Duplicate Check
Describe the bug

TextField controls do not expand vertically:


Setting height explicitly does not work either, but setting min_lines does.

Code sample
Code
import flet as ft

def main(page: ft.Page):
    page.add(
        ft.Container(  # red = outer container, should fill the page
            expand=True,
            border=ft.Border.all(2, ft.Colors.RED),
            content=ft.Row(
                expand=True,
                vertical_alignment=ft.CrossAxisAlignment.STRETCH,
                controls=[
                    ft.Container(  # blue = wraps the TextField, should fill the Row
                        expand=True,
                        border=ft.Border.all(2, ft.Colors.BLUE),
                        content=ft.TextField(
                            label="Journal entry",
                            multiline=True,
                            expand=True,
                            border_color=ft.Colors.GREEN,  # green = the field itself
                        ),
                    ),
                ],
            ),
        )
    )

ft.run(main)
To reproduce

just run the provided code

Expected behavior

I'd like a way for the TextField to expand to arbitrary height. The min_lines workaround is only approximate and needs to be recalculated on every resize.

Screenshots / Videos
Captures

[Upload media here]

Operating System

Linux

Operating system details

Linux hp15fc0xxx 7.2.8-artix1-1 #1 SMP PREEMPT_DYNAMIC Thu, 01 Oct 2026 07:52:48 +0000 x86_64 GNU/Linux

Flet version

1.0.3

Regression

I'm not sure / I don't know

Suggestions

No response

Logs
Logs
[Paste your logs here]
Additional details

No response

Ngôn ngữ chính
Python
Star
17.5k
Fork
740
Merge trung bình
1 ngày 8 giờ
Pull request đã merge (30 ngày)
74

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của flet-dev/flet

Tất cả issue của flet-dev/flet

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.