Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accordion does not support dynamic tabs #622

Closed
LadislavBohm opened this issue Nov 2, 2020 · 4 comments · Fixed by #640
Closed

Accordion does not support dynamic tabs #622

LadislavBohm opened this issue Nov 2, 2020 · 4 comments · Fixed by #640
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@LadislavBohm
Copy link

It seems like Accordion component does not support binding dynamic number of tabs. Following code does not work:

<Accordion>
   <AccordionTab v-for="tab in tabs" :key="tab.title" :header="tab.title">
      <p>{{tab.content}}</p>
   </AccordionTab>
</Accordion>
@ahegyes
Copy link

ahegyes commented Nov 4, 2020

I can confirm this. v-for for the AccordionTab component doesn't work currently.

@dheimoz
Copy link

dheimoz commented Nov 4, 2020

duplicated issue #616

@ntedgi
Copy link
Contributor

ntedgi commented Nov 15, 2020

This issue happens because of this line

at Accordion.vue :line 105

return this.$slots.default().filter(child => child.type.name === 'accordiontab');

when using v-for the child type is Slot(Fragment)

@cagataycivici cagataycivici self-assigned this Nov 25, 2020
@cagataycivici cagataycivici added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Nov 25, 2020
@cagataycivici cagataycivici added this to the 3.0.2 milestone Nov 25, 2020
cagataycivici added a commit that referenced this issue Nov 25, 2020
…c-tabs-622

Fix issue : Accordion does not support dynamic tabs #622
@cagataycivici
Copy link
Member

Fixed and also added a demo for dynamic tabs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants