flet-dev / flet

Flet enables developers to easily build realtime web, mobile and desktop apps in Python. No frontend experience required.
https://flet.dev
Apache License 2.0
11.61k stars 455 forks source link

NavigationBarDestination set disabled does nothing #4029

Closed jeb192004 closed 1 month ago

jeb192004 commented 2 months ago

Duplicate Check

Describe the bug

setting 'disabled=False' does not disable the navigation button and not allow it to be clicked.

Code sample

Code ```python ft.NavigationBar(destinations=[ft.NavigationBarDestination(icon=ft.icons.MENU, selected_icon=ft.icons.VIDEOGAME_ASSET_ROUNDED, label="Menu"), ft.NavigationBarDestination(icon=ft.icons.KEYBOARD_DOUBLE_ARROW_RIGHT_ROUNDED, label="Pass"), ft.NavigationBarDestination(icon=ft.icons.PLAY_ARROW_ROUNDED,label="Play",disabled=False), ft.NavigationBarDestination(icon=ft.icons.SWAP_VERT_ROUNDED,label="Swap\nTiles",), ft.NavigationBarDestination(icon=ft.icons.ASSIGNMENT_RETURNED_OUTLINED,label="Return\n Tiles",) ], on_change=nav_bar_item_clicked, bgcolor='#0D3B66',) ```

To reproduce

set a 'NavigationBarDestination' to disabled ft.NavigationBar(destinations=[ft.NavigationBarDestination(icon=ft.icons.MENU, selected_icon=ft.icons.VIDEOGAME_ASSET_ROUNDED, label="Menu", disabled=False), ],on_change=nav_bar_item_clicked,) and run the app and attempt to click the button

Expected behavior

i expect the button to not work. to not be clickable

Screenshots / Videos

Captures [Upload media here]

Screenshot from 2024-09-19 16-08-13

Operating System

Linux

Operating system details

Fedora

Flet version

Version: 0.24.1

Regression

I'm not sure / I don't know

Suggestions

No response

Logs

No response

Additional details

No response