lotrekagency / mapo

🥭 Our Nuxt module to simplify the making of administration panels, and authenticated web applications.
MIT License
10 stars 3 forks source link

Show correct label in nested tabs #30

Closed edoaxyz closed 2 years ago

edoaxyz commented 2 years ago

When using nested tabs or tabs inside groups, tab labels are rendered as 0,1,2... because fields configuration is passed twice on mapConf, first time on main Form component, second time on nested Form component for group (or tab) and so on... and because mapConf converts tabs object into an array while losing tab object (used for label,icon and slug), the ending Form component gets tabs as an array and treats keys as indexes, so 0,1,2,3... are showed. With this PR the tab object keeps its place into all configurations (parent and child ones) and can be accessed even into nested group/tabs.