This commit is contained in:
2020-01-30 23:40:35 +00:00
parent 3edfdc9f31
commit d755acb5e5
2 changed files with 16 additions and 2 deletions

View File

@@ -48,7 +48,6 @@ CURRENT TODOs
SHELL / NAV / MENUS / LAYOUT
TODO: further customization adding click events to columns and triggering event to parent to open shit
TODO: Add property to enable select on datatable rows and also event to bubble up selected rows to parent
TODO: toolbar above grid for filters, refresh etc (make it a standard component?)
TODO: main.js filters need to be finished

View File

@@ -4,6 +4,7 @@
:caption="caption"
:headers="headers"
:items="records"
v-model="selected"
:options.sync="options"
:server-items-length="totalRecords"
:loading="loading"
@@ -19,6 +20,7 @@
:loading-text="lt('Loading')"
:no-data-text="lt('NoData')"
class="elevation-1"
v-on:item-selected="handleSelect"
>
<!-- /*From server: UiDataTypes
NoType = 0,
@@ -38,6 +40,16 @@
<template v-slot:body="{ items }">
<tbody>
<tr v-for="item in items" :key="item.name">
<template v-if="showSelect">
<td>
<v-checkbox
v-model="selected"
:value="item"
primary
hide-details
></v-checkbox>
</td>
</template>
<td v-for="c in item.columns" :key="c.key">
<!-- Handle all plain text types right up to and including enums -->
<!--TODO when get to coloured stuff will need to add that as a prop to column data but leaving out for now-->
@@ -91,7 +103,7 @@ export default {
totalRecords: 0,
records: [],
rowsPerPageItems: [5, 10, 25, 50, 100],
someKey: 0
selected: []
};
},
props: {
@@ -124,6 +136,9 @@ export default {
}
},
methods: {
handleSelect(obj1, obj2) {
debugger;
},
btnClick(key, i) {
//translate key to actual object type from header data
//key format is row-column e.g."500-2"