diff --git a/src/views/datatable/DataTableColResizeDemo.vue b/src/views/datatable/DataTableColResizeDemo.vue
index 8fe930e73..aec2c2ce0 100755
--- a/src/views/datatable/DataTableColResizeDemo.vue
+++ b/src/views/datatable/DataTableColResizeDemo.vue
@@ -11,21 +11,23 @@
Fit Mode
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
Expand Mode
+
+
+
+
+
-
-
Expand Mode
-
-
-
-
-
-
@@ -34,38 +36,38 @@
<h3>Fit Mode</h3>
-<DataTable :value="cars" :resizableColumns="true" columnResizeMode="fit">
- <Column field="vin" header="Vin"></Column>
- <Column field="year" header="Year"></Column>
- <Column field="brand" header="Brand"></Column>
- <Column field="color" header="Color"></Column>
+<DataTable :value="products" :resizableColumns="true" columnResizeMode="fit">
+ <Column field="code" header="Code"></Column>
+ <Column field="name" header="Name"></Column>
+ <Column field="category" header="Category"></Column>
+ <Column field="quantity" header="Quantity"></Column>
</DataTable>
<h3>Expand Mode</h3>
-<DataTable :value="cars" :resizableColumns="true" columnResizeMode="expand">
- <Column field="vin" header="Vin"></Column>
- <Column field="year" header="Year"></Column>
- <Column field="brand" header="Brand"></Column>
- <Column field="color" header="Color"></Column>
+<DataTable :value="products" :resizableColumns="true" columnResizeMode="expand">
+ <Column field="code" header="Code"></Column>
+ <Column field="name" header="Name"></Column>
+ <Column field="category" header="Category"></Column>
+ <Column field="quantity" header="Quantity"></Column>
</DataTable>
-import CarService from '../../service/CarService';
+import ProductService from '../../service/ProductService';
export default {
data() {
return {
- cars: null
+ products: null
}
},
- carService: null,
+ productService: null,
created() {
- this.carService = new CarService();
+ this.productService = new ProductService();
},
mounted() {
- this.carService.getCarsSmall().then(data => this.cars = data);
+ this.productService.getProductsSmall().then(data => this.products = data);
}
}
@@ -76,20 +78,20 @@ export default {
\ No newline at end of file
diff --git a/src/views/datatable/DataTableColToggleDemo.vue b/src/views/datatable/DataTableColToggleDemo.vue
index 859ad7c1d..ce7452ab3 100755
--- a/src/views/datatable/DataTableColToggleDemo.vue
+++ b/src/views/datatable/DataTableColToggleDemo.vue
@@ -9,14 +9,14 @@
@@ -27,43 +27,43 @@
-<DataTable :value="cars">
+<DataTable :value="products">
<template #header>
<div style="text-align:left">
<MultiSelect :value="selectedColumns" :options="columns" optionLabel="header" @input="onToggle"
placeholder="Select Columns" style="width: 20em"/>
</div>
</template>
- <Column field="vin" header="Vin" />
+ <Column field="code" header="Code" />
<Column v-for="(col, index) of selectedColumns" :field="col.field" :header="col.header" :key="col.field + '_' + index"></Column>
</DataTable>
-import CarService from '../../service/CarService';
+import ProductService from '../../service/ProductService';
export default {
data() {
return {
selectedColumns: null,
columns: null,
- cars: null
+ products: null
}
},
- carService: null,
+ productService: null,
created() {
- this.carService = new CarService();
+ this.productService = new ProductService();
this.columns = [
- {field: 'year', header: 'Year'},
- {field: 'brand', header: 'Brand'},
- {field: 'color', header: 'Color'}
+ {field: 'name', header: 'Name'},
+ {field: 'category', header: 'Category'},
+ {field: 'quantity', header: 'Quantity'}
];
this.selectedColumns = this.columns;
},
mounted() {
- this.carService.getCarsSmall().then(data => this.cars = data);
+ this.productService.getProductsSmall().then(data => this.products = data);
},
methods: {
onToggle(value) {
@@ -79,29 +79,29 @@ export default {