refactor: can receive list from table

This commit is contained in:
Joel Jacob Stephen
2023-08-22 11:32:08 +05:30
parent d9bddb1094
commit c9927ef032
3 changed files with 7 additions and 7 deletions

View File

@@ -28,7 +28,7 @@
</div>
<div v-else>
<HoppSmartTable>
<HoppSmartTable :list="teamsList">
<template #head>
<tr
class="text-secondary border-b border-dividerDark text-sm text-left bg-primaryLight"
@@ -39,9 +39,9 @@
<th class="px-6 py-2"></th>
</tr>
</template>
<template #body>
<template #body="{ list }">
<tr
v-for="team in teamsList"
v-for="team in list"
:key="team.id"
class="text-secondaryDark hover:bg-divider hover:cursor-pointer rounded-xl"
>

View File

@@ -32,7 +32,7 @@
<div v-else-if="error">{{ t('users.load_list_error') }}</div>
<div v-else-if="usersList.length > 0">
<HoppSmartTable>
<HoppSmartTable :list="usersList">
<template #head>
<tr
class="text-secondary border-b border-dividerDark text-sm text-left bg-primaryLight"
@@ -45,9 +45,9 @@
</tr>
</template>
<template #body>
<template #body="{ list }">
<tr
v-for="user in usersList"
v-for="user in list"
:key="user.uid"
class="text-secondaryDark hover:bg-divider hover:cursor-pointer rounded-xl"
>

View File

@@ -14,7 +14,7 @@
</thead>
<tbody class="divide-y divide-divider">
<slot name="body">
<slot name="body" :list="list">
<tr
v-for="(rowData, rowIndex) in list"
:key="rowIndex"