From 938462c6678eb6be44f2b5663700522452b30b07 Mon Sep 17 00:00:00 2001 From: cagataycivici Date: Tue, 9 Jul 2019 16:15:42 +0300 Subject: [PATCH] Responsive demo for DataTable --- src/components/datatable/DataTable.vue | 31 +-------- src/components/datatable/HeaderCheckbox.vue | 6 +- src/components/datatable/RowCheckbox.vue | 6 +- src/components/datatable/RowRadioButton.vue | 6 +- .../datatable/DataTableResponsiveDemo.vue | 68 ++++++++++++++++--- 5 files changed, 67 insertions(+), 50 deletions(-) diff --git a/src/components/datatable/DataTable.vue b/src/components/datatable/DataTable.vue index f900fa68e..cf141c47e 100644 --- a/src/components/datatable/DataTable.vue +++ b/src/components/datatable/DataTable.vue @@ -830,7 +830,7 @@ export default { }, allRowsSelected() { const val = this.processedData; - return (this.value && this.value.length > 0 && this.selection && this.selection.length > 0 && this.selection.length === this.value.length); + return (val && val.length > 0 && this.selection && this.selection.length > 0 && this.selection.length === val.length); } }, components: { @@ -995,35 +995,6 @@ export default { display: none; } -/* Responsive */ -.p-datatable-responsive .p-datatable-tbody > tr > td .p-column-title { - display: none; -} - -@media screen and (max-width: 40em) { - .p-datatable-responsive .p-datatable-thead > tr > th, - .p-datatable-responsive .p-datatable-tfoot > tr > td { - display: none !important; - } - - .p-datatable-responsive .p-datatable-tbody > tr > td { - text-align: left; - display: block; - border: 0 none; - width: 100% !important; - float: left; - clear: left; - } - - .p-datatable-responsive .p-datatable-tbody > tr > td .p-column-title { - padding: .4em; - min-width: 30%; - display: inline-block; - margin: -.4em 1em -.4em -.4em; - font-weight: bold; - } -} - /* Loader */ .p-datatable .p-datatable-loading-overlay { position: absolute; diff --git a/src/components/datatable/HeaderCheckbox.vue b/src/components/datatable/HeaderCheckbox.vue index 3401a9a35..fe8071157 100644 --- a/src/components/datatable/HeaderCheckbox.vue +++ b/src/components/datatable/HeaderCheckbox.vue @@ -10,8 +10,6 @@ \ No newline at end of file + + + \ No newline at end of file