New Dropdown errors
Duplicate Check
- [x] I have searched the opened issues and there are no duplicates
Describe the bug
First error: dense=True is not working Second error: When you clear the dropdown.value (value='' or value = None), the defined option continues appearing... In the previous version, you just had to set value='' (dropdown_name.value=''), for the defined option to disappear, and the dropdown label to reappear. Now nothing happens.
I need both working ASAP. New version is frozen until these bugs are fixed.
Code sample
Code
[status_search=ft.Dropdown(
label=' Status',
#width=110,
text_align=ft.alignment.center_left,
bgcolor=ft.Colors.WHITE,
dense=True,
filled=True,
fill_color=ft.Colors.WHITE,
color=ft.Colors.GREY_700,
border_color=ft.Colors.BLACK,
border_width=1,
hint_text=' Status',
hint_style=ft.TextStyle(size=14,color=ft.Colors.GREY_700,weight="BOLD",font_family='Tahoma'),
text_style=ft.TextStyle(size=14,color=ft.Colors.GREY_700,font_family='Tahoma'),
border_radius=1,
content_padding=1,
options=[
ft.dropdown.Option('Pendente'),
ft.dropdown.Option('Aprovado'),
ft.dropdown.Option('Reprovado'),
ft.dropdown.Option('Andamento'),
ft.dropdown.Option('Finalizado'),
ft.dropdown.Option('Retirado'),
],
on_change=inputsearch,
autofocus=True
status_search.value=''
page.update()
)]
To reproduce
first error: create a dropdown button with dense=True second error: Just create a dropdown menu button and try to clear it's value
Expected behavior
In both problems, nothing happens
Screenshots / Videos
Captures
[Upload media here]
Operating System
Windows
Operating system details
Windows 10
Flet version
0.28.3
Regression
Yes, it used to work in a previous Flet version (please specify the version in additional details)
Suggestions
No response
Logs
Logs
[Paste your logs here]
Additional details
No response
I found another error. The option selection button does not shrink when using dropdown buttons with Responsive Rows. This causes the width of the button to be much larger so that the text does not wrap.
What's going on, guys? You've regressed functionality instead of evolving it!
Is it best to revert to the previous version? If so, how do I do that?
Did you find those errors on 0.28.3, or on 0.70.0?
Did you find those errors on 0.28.3, or on 0.70.0?
Don't you have anything more useful to do than make lame fifth-grade jokes? How about helping fix the bug? Your brain would thank you.
I found the error in the 0.28.3 version
I found the error in the 0.28.3 version Great!
Use 0.80.5
pip install flet==0.80.5
And try again
All three points are covered now, so I'm closing this ticket:
- Clearing the value: fixed in 0.80.0 by #5800 (tracked in #5119). Setting
dropdown.value = None(or"") and callingupdate()empties the field and brings the label back, also after the user picked an option. dense=Truehas no effect: this is #5047. The trailing arrow button of the Material 3 dropdown sets a minimum height for the field, sodensecan't shrink it yet. Please follow #5047 for the fix.- Width inside
ResponsiveRow: the field shrinks to fit its column. The open menu is at least as wide as the field and grows to fit the longest option, which is how the Material 3 dropdown works. If you want long options to wrap, setwidthon theDropdown; the menu then uses that width and long labels wrap.
If something still looks wrong on 1.0.x, please comment here with a minimal snippet.