bug: TextField does not resize vertically

Abierto
#6,915 2 comentarios 0 reacciones 1 asignado Ver en GitHub

Los mantenedores suelen responder en 1 día

@ndonkoHenri ya está trabajando en esto.

Desde el 4/10/2026.

Evaluación

Este issue todavía no se ha evaluado.

Descripción

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

Lenguaje dominante
Python
Estrellas
17.5k
Forks
740
Merge medio
1 d 11 h
PR fusionados (30 d)
75

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de flet-dev/flet

Todos los issues de flet-dev/flet

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.