@litable/vue2
v1.0.0
Published
Vue 2 wrapper for LiTable
Readme
@litable/vue2
Vue 2 wrapper for LiTable.
Install
npm install @litable/vue2 @litable/coreUsage
<template>
<LiTable
:data="rows"
:columns="columns"
:pagination="{ enabled: true, pageSize: 20 }"
:sorting="true"
:filtering="true"
/>
</template>
<script>
import LiTable from '@litable/vue2';
export default {
components: { LiTable },
data() {
return {
rows: [...],
columns: [
{ field: 'name', title: 'Name', sortable: true },
],
};
},
};
</script>Props
All LiTableOptions fields map to Vue props. Change detection is handled with a deep watcher — any prop update triggers .update() on the underlying instance.
TypeScript
import type { LiTableOptions, ColumnDef } from '@litable/vue2';