Fixed #424 - Duplicate keys in TreeTable
parent
60673fc845
commit
d7e7ec9652
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<tr :class="containerClass" @click="onClick" @keydown="onKeyDown" @touchend="onTouchEnd" :style="node.style" tabindex="0">
|
||||
<td v-for="(col,i) of columns" :key="node.key + '_' + col.columnKey||col.field||i" :style="col.bodyStyle" :class="col.bodyClass">
|
||||
<td v-for="(col,i) of columns" :key="col.columnKey||col.field||i" :style="col.bodyStyle" :class="col.bodyClass">
|
||||
<button type="button" class="p-treetable-toggler p-link" @click="toggle" v-if="col.expander" :style="togglerStyle" tabindex="-1" v-ripple>
|
||||
<i :class="togglerIcon"></i>
|
||||
</button>
|
||||
|
|
|
@ -31,6 +31,7 @@ const TreeTableRowLoader = {
|
|||
},
|
||||
render(createElement, context) {
|
||||
const root = createElement(TreeTableRow, {
|
||||
key: context.props.node.key,
|
||||
props: context.props,
|
||||
on: {
|
||||
'node-toggle': context.listeners['node-toggle'],
|
||||
|
@ -51,6 +52,7 @@ const TreeTableRowLoader = {
|
|||
childNodeProps.level = context.props.level + 1;
|
||||
|
||||
let childNodeElement = createElement(TreeTableRowLoader, {
|
||||
key: childNode.key,
|
||||
props: childNodeProps,
|
||||
on: {
|
||||
'node-toggle': context.listeners['node-toggle'],
|
||||
|
|
Loading…
Reference in New Issue