vue3-easy-data-table
vue3-easy-data-table copied to clipboard
<Vue3EasyDataTable :items=items> Doesn't return with checkbox
I did a crud and when I change value, the item variable doesn't has checkbox, so the checkbox get unchecked, but the itemselected still with the item of checkbox.
my code:
<Vue3EasyDataTable
:headers="headers"
:items="items"
theme-color="#43807a"
v-model:items-selected="itemsSelected"
buttons-pagination
fixed-checkbox
alternating
header-text-direction="center"
body-text-direction="center"
rows-of-page-separator-message="de"
empty-message="Sem dados"
hide-rows-per-page
:rows-per-page="5"
table-class-name="customize-table"
:loading="fieldStore.isLoading"
>
<template #item-prod="{ prod }">
<span
v-for="(product, index) in prod"
:key="index"
>
<v-chip size="x-small">{{ getProductName(product) }}</v-chip>
</span>
</template>
<template #item-work="{ work }">
{{ work[0] }}h às {{ work[1] }}h
</template>
<template #item-operation="item">
<div class="d-flex justify-center align-center">
<v-btn
size="x-small"
icon="mdi-pencil"
color="primary"
@click.prevent="editItem(item)"
/>
</div>
</template>
</Vue3EasyDataTable>
Could you please provide more details like screenshots or gifs?
@rangeldor Can you provide a reproducible link (StackBlitz/Codesandbox.io) or repo? Because, I am also using about the same props and getting checkboxes in the result
I have a problem i used this code:
<EasyDataTable :items="Item" :headers="Header"></EasyDataTable>
but in the browser I get this issue please can i found somone here to help me
the error:
runtime-core.esm-bundler.js?20a8:7609
Uncaught (in promise) TypeError: Cannot read properties of null (reading 'setupContext')
at getContext (runtime-core.esm-bundler.js?20a8:7609:1)
at useSlots (runtime-core.esm-bundler.js?20a8:7599:1)
at setup (vue3-easy-data-table.es.js?ed00:1305:1)
at callWithErrorHandling (runtime-core.esm-bundler.js?d2dd:157:1)
at setupStatefulComponent (runtime-core.esm-bundler.js?d2dd:7246:1)
at setupComponent (runtime-core.esm-bundler.js?d2dd:7200:1)
at mountComponent (runtime-core.esm-bundler.js?d2dd:5524:1)
at processComponent (runtime-core.esm-bundler.js?d2dd:5499:1)
at patch (runtime-core.esm-bundler.js?d2dd:5101:1)
at ReactiveEffect.componentUpdateFn [as fn] (runtime-core.esm-bundler.js?d2dd:5638:1)
at ReactiveEffect.run (reactivity.esm-bundler.js?89dc:187:1)
at instance.update (runtime-core.esm-bundler.js?d2dd:5745:1)
at setupRenderEffect (runtime-core.esm-bundler.js?d2dd:5759:1)
at mountComponent (runtime-core.esm-bundler.js?d2dd:5541:1)
at processComponent (runtime-core.esm-bundler.js?d2dd:5499:1)
at patch (runtime-core.esm-bundler.js?d2dd:5101:1)
@LAILA289 open a new issue, instead of polluting other issues, and also provide a reproducible link, Stackblitz or Github Repo
@mrhammadasif Here is the StackBlitz link - https://stackblitz.com/edit/vitejs-vite-2kman5?file=package.json,src%2Fmain.js,src%2FApp.vue&terminal=dev
Please check, the checkbox do not come.
@yashwp because you have not specified the v-model:items-selected="itemsSelected"