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

item is undefined when using group-hover (Vue 3 + TailwindCSS) #195

Open
maswebber opened this issue Jun 28, 2023 · 0 comments
Open

item is undefined when using group-hover (Vue 3 + TailwindCSS) #195

maswebber opened this issue Jun 28, 2023 · 0 comments

Comments

@maswebber
Copy link

maswebber commented Jun 28, 2023

Hello, i got error item is undefined, here my environtment system
Environtment:

  • Linux Mint 21.1 x86_64
  • Firefox 114.0.2
  • Vite 4.3.9
  • Vue 3.3.4
  • TailwindCSS 3.3.2
  • vue-slicksort 2.0.5

The code :

<SlickList axis="y" v-model:list="col.cards" class="space-y-2 overflow-y-auto overflow-x-hidden max-h-96" :group="col.column" :accept="true">
   <SlickItem v-for="(item, i) in col.cards" :key="i" :index="i" class="bg-slate-200 rounded-md px-3 py-4 flex gap-2 group hover:bg-slate-300">
        <h1 class="grow text-sm font-lights">{{ item.title }}</h1>
         <button @click="delItems(index, i)" class="group-hover:visible invisible grow-0">
            <font-awesome-icon :icon="['fas', 'pen-to-square']" size="sm" class=""></font-awesome-icon>
         </button>
   </SlickItem>
</SlickList>

item is undefined when using group-hover in button
image

and the cards array element that got deleted became null
image

when i remove the group-hover:visible invisible from button, the error gone

<SlickList axis="y" v-model:list="col.cards" class="space-y-2 overflow-y-auto overflow-x-hidden max-h-96" :group="col.column" :accept="true">
   <SlickItem v-for="(item, i) in col.cards" :key="i" :index="i" class="bg-slate-200 rounded-md px-3 py-4 flex gap-2 group hover:bg-slate-300">
        <h1 class="grow text-sm font-lights">{{ item.title }}</h1>
         <button @click="delItems(index, i)" class="grow-0">
            <font-awesome-icon :icon="['fas', 'pen-to-square']" size="sm" class=""></font-awesome-icon>
         </button>
   </SlickItem>
</SlickList>

any idea why this happened ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant