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
hello
i'm building flet app, i have router file that handles the routing,
a main page with table of rows with objects, and a button in each row
that when clicked, should open a new page and pass a param with that call.
at the moment i have a func from mainpage that calls secondpage(page) and i cannot manage
to pass a param with that secondpage(page) function to use an object on secondpage..
this is the button:
details = ft.DataCell(
ft.IconButton(
ft.icons.CAR_REPAIR_SHARP,
#on_click=lambda _: self.page.route("/details", vehicle=vehicle),
#on_click=on_details_click,
on_click=lambda _: self.page.go("/details"),# route_params={"vehicle_id": vehicle.car_id}),
style=ft.ButtonStyle(color=ft.colors.BLUE)
)
)
This discussion was converted from issue #1720 on August 13, 2023 15:19.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
hello
i'm building flet app, i have router file that handles the routing,
a main page with table of rows with objects, and a button in each row
that when clicked, should open a new page and pass a param with that call.
at the moment i have a func from mainpage that calls secondpage(page) and i cannot manage
to pass a param with that secondpage(page) function to use an object on secondpage..
this is the button:
details = ft.DataCell(
ft.IconButton(
ft.icons.CAR_REPAIR_SHARP,
#on_click=lambda _: self.page.route("/details", vehicle=vehicle),
#on_click=on_details_click,
on_click=lambda _: self.page.go("/details"),# route_params={"vehicle_id": vehicle.car_id}),
style=ft.ButtonStyle(color=ft.colors.BLUE)
)
)
this is the router:
class MyRouter:
thanks for your help
Beta Was this translation helpful? Give feedback.
All reactions