diff --git a/src/views/datatable/DataTableSelectionDemo.vue b/src/views/datatable/DataTableSelectionDemo.vue
index 08d93d35c..daea4af45 100644
--- a/src/views/datatable/DataTableSelectionDemo.vue
+++ b/src/views/datatable/DataTableSelectionDemo.vue
@@ -41,6 +41,16 @@
+
+
Events
+ row-select and row-unselects are available as selection events.
+
+
+
+
+
+
@@ -57,6 +67,7 @@ export default {
return {
cars: null,
selectedCar1: null,
+ selectedCar2: null,
selectedCars1: null,
selectedCars2: null
}
@@ -68,6 +79,14 @@ export default {
mounted() {
this.carService.getCarsSmall().then(data => this.cars = data);
},
+ methods: {
+ onRowSelect(event) {
+ this.$toast.add({severity: 'info', summary: 'Car Selected', detail: 'Vin: ' + event.data.vin, life: 3000});
+ },
+ onRowUnselect(event) {
+ this.$toast.add({severity: 'warn', summary: 'Car Unselected', detail: 'Vin: ' + event.data.vin, life: 3000});
+ }
+ },
components: {
'DataTableDoc': DataTableDoc,
'DataTableSubMenu': DataTableSubMenu