-
Notifications
You must be signed in to change notification settings - Fork 581
Closed
Description
Set the dropdown to be disabled, but the color is normal
Code example to reproduce the issue:
import flet as ft
def main(page: ft.Page):
drop = ft.Dropdown(
label="disabled but color is wrong",
options=[ft.dropdown.Option(str(i)) for i in range(3)])
text = ft.TextField(value="disabled", disabled=True)
drop1 = ft.Dropdown(
label="disabled set color gray",
options=[ft.dropdown.Option(str(i)) for i in range(3)],
disabled=True, border_color=ft.colors.GREY_300, label_style=ft.TextStyle(color=ft.colors.GREY_400))
drop.disabled = True
page.add(drop)
page.add(text)
page.add(drop1)
if __name__ == '__main__':
ft.app(target=main, name="index", host='0.0.0.0', port=37876, view=ft.WEB_BROWSER)
**Describe the results you received:
the color of the first control named drop isnot gray
**
Describe the results you expected:all controls are gray, including the control named drop
Additional information you deem important (e.g. issue happens only occasionally):
Flet version (pip show flet
):
flet 0.21.2
flet-core 0.21.2
flet-runtime 0.21.2
Give your requirements.txt
file (don't pip freeze
, instead give direct packages):
(The requirements)
Operating system: MacOS
Additional environment details:
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
✅ Done