Allow changing selected tabs #643
-
I have multi-tab forms. I want a way to select a tab programmatically, particularly when form validation fails. I'd like to be able to tell it which tab to select. It would be nice to have an API for this. I realize that may feel out of scope, at least for now in early development. So given that, how would others handle this? I'm thinking perhaps the easiest way is just to select the tab button and click it using javascript. That would trigger everything related to it. But I'm wondering if anyone has a less hacky way. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
@erikwestlund If I understand your post correctly, you can accomplish this using a property that you |
Beta Was this translation helpful? Give feedback.
-
Yes, this is perfect and exactly what I needed. Sorry, missed it -- might be worth documenting on the Tabs component page. |
Beta Was this translation helpful? Give feedback.
@erikwestlund If I understand your post correctly, you can accomplish this using a property that you
wire:model
to your tabs, e.g.:#580 (comment)
Docs: https://fluxui.dev/docs/patterns#data-binding