You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
importfletasftdefmain(page: ft.Page):
page.theme_mode="light"page.add(
ft.Row(
controls=[
ft.Column(
[
ft.FilledButton("Filled", disabled=True), # button-specific-disable disables the button as expected and the color/bgcolor is also modifiedft.FilledTonalButton("Filled tonal", disabled=True),
ft.ElevatedButton("Elevated")
],
disabled=True
),
ft.Column(
[
ft.FilledButton("Filled"), # setting disabled=True here will turn off the bgcolor shownft.FilledTonalButton("Filled tonal"), # setting disabled=True here will turn off the bgcolor shownft.ElevatedButton("Elevated")
],
disabled=True# this disables the first two buttons but their bgcolors are not modified
)
]
)
)
if__name__=="__main__":
ft.app(target=main)
Running this code, you will notice that the filled and filledtonal btns in the second column still have their bgcolor set, although they are disabled. To solve this, I am forced to add a specific disable=True in their object creation as seen in the first column.
The expected behavior could be observed by having a look at the elevatedbutton which is 'perfectly' disabled.
I remember a commit was pushed for this sticky bgcolor issue on-disable, but seems like it works 'perfectly' only when setting disabled=True at object creation and not globally.
The text was updated successfully, but these errors were encountered:
ndonkoHenri
changed the title
Filled and FilledTonal Buttons bgcolor sticks on disable
Filled and FilledTonal Buttons bgcolor sticks on global disable
Jun 19, 2023
Code:
bgcolor
set, although they are disabled. To solve this, I am forced to add a specificdisable=True
in their object creation as seen in the first column.The expected behavior could be observed by having a look at the elevatedbutton which is 'perfectly' disabled.
I remember a commit was pushed for this sticky
bgcolor
issue on-disable, but seems like it works 'perfectly' only when settingdisabled=True
at object creation and not globally.The text was updated successfully, but these errors were encountered: