F
Filamentβ€’17mo ago
Mastjoe

A form field as a navigation item

Any idea how I can get a select form field to be a navigation item in V3?
6 Replies
toeknee
toekneeβ€’17mo ago
Just redirect on select? use the afterStateUpdated and trigger a native redirect
Mastjoe
MastjoeOPβ€’17mo ago
@toeknee_iom not actually redirecting on select, more like a static select dropdown on the nav for switching user or branches kind of
toeknee
toekneeβ€’17mo ago
So basially what the Panels Selector doeS? Then just have different panels for each section?
Mastjoe
MastjoeOPβ€’17mo ago
@toeknee_iom The branches are much to make a panel for each of them, so basically selecting the branch, sets and persist some value in session which in turn affects the base or index query of most resources, ensuring that the data served to the branch is solely that of the branch. With my above use case, can panel selector still work for me? or any way I can tweak it to work for me?
toeknee
toekneeβ€’17mo ago
Ok so what you are describing is multi-tenant. So you need to setup teams within v3 and the teams will be the branches. Then you can apply global scopes onto the models to filter the data on the model by the team id (branch)
Mastjoe
MastjoeOPβ€’17mo ago
Oh.. I see.. let me have a look at the doc again, thanks for pointing this out @toeknee_iom πŸ™πŸ»
Want results from more Discord servers?
Add your server