Lunrtick/vue-bulma-accordion

:initialopenitem not working after the update

Closed this issue · 3 comments

Hello,

Can you put an example on how to use :initialopenitem or :initialopenitems?

It's not working

Thanks,

I'm working on adding some more examples.

Not sure if this applies to you, but you may want to look at the Vue docs on props here.

Here's an example

<BulmaAccordion initial-open-item="1">
  <BulmaAccordionItem>
    <p slot="title">Title</p>
  </BulmaAccordionItem>
  <BulmaAccordionItem>
    <p slot="title">Title</p>
  </BulmaAccordionItem>
</BulmaAccordion>

Still not working

Here's my code

        <BulmaAccordion
        :dropdown="false"
        :icon="'custom'"
        class="w-100"
        initial-open-item="'1'"
        :caretAnimation="{
              duration: '.6s',
              timerFunc: 'ease-in-out'
          }"
          :slide="{
              duration: '.9s',
              timerFunc: 'none'
          }"

initial-open-item="'1'" means you're passing the string " '1' ", instead of the string "1".

Either do :initial-open-item="'1'" or simply initial-open-item="1"