Refactor on ColumnToggler demo

pull/345/head
mertsincan 2020-05-24 00:01:29 +03:00
parent 10726918f6
commit e20a6964f3
1 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@
</div> </div>
</template> </template>
<Column field="vin" header="Vin" /> <Column field="vin" header="Vin" />
<Column v-for="col of selectedColumns" :field="col.field" :header="col.header" :key="col.field"></Column> <Column v-for="(col, index) of selectedColumns" :field="col.field" :header="col.header" :key="col.field + '_' + index"></Column>
</DataTable> </DataTable>
</div> </div>
@ -33,7 +33,7 @@
&lt;/div&gt; &lt;/div&gt;
&lt;/template&gt; &lt;/template&gt;
&lt;Column field="vin" header="Vin" /&gt; &lt;Column field="vin" header="Vin" /&gt;
&lt;Column v-for="col of selectedColumns" :field="col.field" :header="col.header" :key="col.field"&gt;&lt;/Column&gt; &lt;Column v-for="(col, index) of selectedColumns" :field="col.field" :header="col.header" :key="col.field + '_' + index"&gt;&lt;/Column&gt;
&lt;/DataTable&gt; &lt;/DataTable&gt;
</template> </template>
</CodeHighlight> </CodeHighlight>