This commit is contained in:
@@ -48,7 +48,6 @@ CURRENT TODOs
|
|||||||
SHELL / NAV / MENUS / LAYOUT
|
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: 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: toolbar above grid for filters, refresh etc (make it a standard component?)
|
||||||
TODO: main.js filters need to be finished
|
TODO: main.js filters need to be finished
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
:caption="caption"
|
:caption="caption"
|
||||||
:headers="headers"
|
:headers="headers"
|
||||||
:items="records"
|
:items="records"
|
||||||
|
v-model="selected"
|
||||||
:options.sync="options"
|
:options.sync="options"
|
||||||
:server-items-length="totalRecords"
|
:server-items-length="totalRecords"
|
||||||
:loading="loading"
|
:loading="loading"
|
||||||
@@ -19,6 +20,7 @@
|
|||||||
:loading-text="lt('Loading')"
|
:loading-text="lt('Loading')"
|
||||||
:no-data-text="lt('NoData')"
|
:no-data-text="lt('NoData')"
|
||||||
class="elevation-1"
|
class="elevation-1"
|
||||||
|
v-on:item-selected="handleSelect"
|
||||||
>
|
>
|
||||||
<!-- /*From server: UiDataTypes
|
<!-- /*From server: UiDataTypes
|
||||||
NoType = 0,
|
NoType = 0,
|
||||||
@@ -38,6 +40,16 @@
|
|||||||
<template v-slot:body="{ items }">
|
<template v-slot:body="{ items }">
|
||||||
<tbody>
|
<tbody>
|
||||||
<tr v-for="item in items" :key="item.name">
|
<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">
|
<td v-for="c in item.columns" :key="c.key">
|
||||||
<!-- Handle all plain text types right up to and including enums -->
|
<!-- 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-->
|
<!--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,
|
totalRecords: 0,
|
||||||
records: [],
|
records: [],
|
||||||
rowsPerPageItems: [5, 10, 25, 50, 100],
|
rowsPerPageItems: [5, 10, 25, 50, 100],
|
||||||
someKey: 0
|
selected: []
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
@@ -124,6 +136,9 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
handleSelect(obj1, obj2) {
|
||||||
|
debugger;
|
||||||
|
},
|
||||||
btnClick(key, i) {
|
btnClick(key, i) {
|
||||||
//translate key to actual object type from header data
|
//translate key to actual object type from header data
|
||||||
//key format is row-column e.g."500-2"
|
//key format is row-column e.g."500-2"
|
||||||
|
|||||||
Reference in New Issue
Block a user