This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
:loading="loading"
|
:loading="loading"
|
||||||
:disable-sort="true"
|
:disable-sort="true"
|
||||||
:show-select="showSelect"
|
:show-select="showSelect"
|
||||||
|
:single-select="singleSelect"
|
||||||
:footer-props="{
|
:footer-props="{
|
||||||
showCurrentPage: true,
|
showCurrentPage: true,
|
||||||
showFirstLastPage: true,
|
showFirstLastPage: true,
|
||||||
@@ -43,9 +44,10 @@
|
|||||||
<td>
|
<td>
|
||||||
<v-checkbox
|
<v-checkbox
|
||||||
v-model="selected"
|
v-model="selected"
|
||||||
:value="item.id"
|
:value="item"
|
||||||
primary
|
primary
|
||||||
hide-details
|
hide-details
|
||||||
|
@change="handleSelect($event)"
|
||||||
></v-checkbox>
|
></v-checkbox>
|
||||||
</td>
|
</td>
|
||||||
</template>
|
</template>
|
||||||
@@ -121,6 +123,10 @@ export default {
|
|||||||
showSelect: {
|
showSelect: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
},
|
||||||
|
singleSelect: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -136,8 +142,11 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleSelect(obj1, obj2) {
|
handleSelect(selectedItem) {
|
||||||
debugger;
|
//due to making own template for items need to handle singleselect which only affects if select all checkbox at top is visible when making own item template
|
||||||
|
if (this.singleSelect) {
|
||||||
|
this.selected.splice(0, this.selected.length - 1);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
btnClick(key, i) {
|
btnClick(key, i) {
|
||||||
//translate key to actual object type from header data
|
//translate key to actual object type from header data
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
:caption="getCaption()"
|
:caption="getCaption()"
|
||||||
:dataFilterId="currentDataFilterId"
|
:dataFilterId="currentDataFilterId"
|
||||||
:showSelect="true"
|
:showSelect="true"
|
||||||
|
:singleSelect="true"
|
||||||
>
|
>
|
||||||
</gz-data-table>
|
</gz-data-table>
|
||||||
</v-container>
|
</v-container>
|
||||||
|
|||||||
Reference in New Issue
Block a user