fixup for row id bug after change to system where FIRST column is NOT actually the rowid column anymore

This commit is contained in:
2020-04-02 20:42:20 +00:00
parent e44362d6ff
commit d9cf0dd106
2 changed files with 11 additions and 7 deletions

View File

@@ -64,9 +64,6 @@
<template v-slot:body="{ items }">
<tbody>
<tr v-for="item in items" :key="item.id">
{{
item.id
}}
<template v-if="showSelect">
<td>
<v-checkbox
@@ -614,12 +611,19 @@ function buildRecords(listData, columndefinitions) {
for (let iRow = 0; iRow < listData.length; iRow++) {
let row = listData[iRow];
//iterate row and build object representing row data keyed to index
//first column is the default column which sets the id for the row
let o = { id: row[0].v, columns: {} };
debugger;
//container object for row
//id will be set later when code below encounters the id column which could be in any position but is identified by it's rid property
let o = { id: undefined, columns: {} };
for (let iColumn = 0; iColumn < row.length; iColumn++) {
let column = row[iColumn];
//rowId?
if (column.rid) {
o.id = column.i;
}
let dataType = columndefinitions[iColumn].dt;
let display = column.v;
/*

View File

@@ -4,7 +4,7 @@
:dataListKey="dataListKey"
:dataListFilter="dataListFilter"
:dataListSort="dataListSort"
:showSelect="true"
:showSelect="false"
:singleSelect="false"
v-on:update:selected="handleSelected"
>