Skip to content

bug: Changing col to ResponsiveRow controls does not get updated #6734

Description

@jnsh

Duplicate Check

Describe the bug

Changing col to ResponsiveRow controls does not change the row layout after update().
Adding and removing the row from page does change the layout according to the updated col values

Code sample

Code
import flet as ft

def main(page: ft.Page):

    row = ft.ResponsiveRow(
        spacing=10, run_spacing=10, columns=12,
    )

    def button_handler():
        # does not work
        for c in row.controls:
            c.col /= 2
            print("col", c.col)

        # works
        #row.columns *= 2

        page.update()

    def force_refresh():
        page.clean()
        page.add(ft.Container(row, expand=True))
        page.add(button)
        page.add(button2)
        page.update()
        print("row re-added to page")

    for i in range(20):
        row.controls.append(
            ft.Container(
                content=ft.Text(i, color=ft.Colors.BLACK),
                padding=50,
                bgcolor=ft.Colors.YELLOW,
            )
        )
        print("col", row.controls[-1].col)


    button = ft.Button("increase columns", on_click=button_handler)
    button2 = ft.Button("re-add row to page", on_click=force_refresh)

    page.add(ft.Container(row, expand=True))
    page.add(button)
    page.add(button2)
    page.update()

ft.run(main)

To reproduce

  1. Add ResponsiveRow with some controls to page
  2. Change col on the ResponsiveRow controls, and call update() to the row

Expected behavior

No response

Screenshots / Videos

Captures
Screencast.From.2026-07-28.03-47-13.mp4

The "increase columns" button halves the col value on the ResponsiveRow controls and calls update(). This does not change the row layout.
By clicking "re-add row to page" the ResponsiveRow is removed and re-added to the page, and the row layout gets updated.

Operating System

Linux

Operating system details

Arch Linux

Flet version

0.86.2

Regression

Yes, it used to work in a previous Flet version (please specify the version in additional details)

Suggestions

This used to work, but has been broken for some time. I can't determine the exact version when this was introduced, it could be as far back as the first 1.0beta releases.

Logs

Logs
[Paste your logs here]

Additional details

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions