Jacobs63 / vue3-tabs-component

Vue 3 tabs component
MIT License
96 stars 27 forks source link

Fix hash #29

Closed DarKsandr closed 1 year ago

DarKsandr commented 1 year ago

I've noticed that if is-disabled is false first, then the component stops working correctly. Example App.vue:

<template>
  <button @click="dis=!dis">toggle ({{ dis }})</button>
  <tabs>
    <tab name="First tab">
      first
    </tab>
    <tab name="Disabled tab" :is-disabled="dis">
      dis1
    </tab>
    <tab name="Disabled tab2" :is-disabled="dis">
      dis2
    </tab>
  </tabs>
</template>

<script setup>
import { ref } from 'vue'

const dis = ref(true);
</script>
Jacobs63 commented 1 year ago

Agreed - the hash did not react to changing the disabled prop.

Thank you for the contribution.