We've moved discussions to Discord

Dynamically add tabs

Tim Dowling
Looking for some guidance on adding tabs dynamically.

Could i use a dynamic nested form controller and repurpose it to create the tab and tab panel? How would others recommend i approach this?

The use case is having checklists where users can create a "checklist section" and from there create "checklist items". The sections would be the dynamic tabs.....
Chris Oliver
Hey Tim,

If you're using Stimulus, you can probably just insert HTML for the new tab and make sure that it has the correct data attributes to register it as a tab in the set. Stimulus monitors DOM changes, so it'll automatically pick up that stuff and make it work.
Notifications
You’re not receiving notifications from this thread.