diff --git a/src/components/datatable/DataTable.vue b/src/components/datatable/DataTable.vue index e76203a39..38b3553ef 100755 --- a/src/components/datatable/DataTable.vue +++ b/src/components/datatable/DataTable.vue @@ -385,7 +385,7 @@ export default { this.updateScrollWidth(); } - if (this.responsiveLayout === 'stack') { + if (this.responsiveLayout === 'stack' && !this.scrollable) { this.createResponsiveStyle(); } }, @@ -1591,6 +1591,12 @@ export default { border: 0 none; } + .p-datatable[${this.attributeSelector}].p-datatable-gridlines .p-datatable-tbody > tr > td:last-child { + border-top: 0; + border-right: 0; + border-left: 0; + } + .p-datatable[${this.attributeSelector}] .p-datatable-tbody > tr > td > .p-column-title { display: block; } @@ -1769,7 +1775,6 @@ export default { border-collapse: collapse; width: 100%; table-layout: fixed; - white-space: nowrap; } .p-datatable .p-sortable-column { diff --git a/src/views/datatable/DataTableColGroupDemo.vue b/src/views/datatable/DataTableColGroupDemo.vue index d633d766e..a629ca6b7 100755 --- a/src/views/datatable/DataTableColGroupDemo.vue +++ b/src/views/datatable/DataTableColGroupDemo.vue @@ -9,7 +9,7 @@
- + diff --git a/src/views/datatable/DataTableCrudDemo.vue b/src/views/datatable/DataTableCrudDemo.vue index 40d0e6a78..a5a03246c 100755 --- a/src/views/datatable/DataTableCrudDemo.vue +++ b/src/views/datatable/DataTableCrudDemo.vue @@ -24,7 +24,7 @@ + currentPageReportTemplate="Showing {first} to {last} of {totalRecords} products" responsiveLayout="scroll"> - - - + + + - + - - + > + > - + > @@ -192,26 +192,26 @@ </div> </template> - <Column selectionMode="multiple" headerStyle="width: 3rem" :exportable="false"></Column> - <Column field="code" header="Code" :sortable="true"></Column> - <Column field="name" header="Name" :sortable="true"></Column> + <Column selectionMode="multiple" style="width: 3rem" :exportable="false"></Column> + <Column field="code" header="Code" :sortable="true" style="min-width:12rem"></Column> + <Column field="name" header="Name" :sortable="true" style="min-width:16rem"></Column> <Column header="Image"> <template #body="slotProps"> <img :src="'demo/images/product/' + slotProps.data.image" :alt="slotProps.data.image" class="product-image" /> </template> </Column> - <Column field="price" header="Price" :sortable="true"> + <Column field="price" header="Price" :sortable="true" style="min-width:8rem"> <template #body="slotProps"> {{formatCurrency(slotProps.data.price)}} </template> </Column> - <Column field="category" header="Category" :sortable="true"></Column> - <Column field="rating" header="Reviews" :sortable="true"> + <Column field="category" header="Category" :sortable="true" style="min-width:10rem"></Column> + <Column field="rating" header="Reviews" :sortable="true" style="min-width:12rem"> <template #body="slotProps"> <Rating :modelValue="slotProps.data.rating" :readonly="true" :cancel="false" /> </template> </Column> - <Column field="inventoryStatus" header="Status" :sortable="true"> + <Column field="inventoryStatus" header="Status" :sortable="true" style="min-width:12rem"> <template #body="slotProps"> <span :class="'product-badge status-' + (slotProps.data.inventoryStatus ? slotProps.data.inventoryStatus.toLowerCase() : '')">{{slotProps.data.inventoryStatus}}</span> </template> @@ -481,26 +481,26 @@ export default {
- - - + + + - + - - + + - + diff --git a/src/views/datatable/DataTableDemo.vue b/src/views/datatable/DataTableDemo.vue index 206c2a232..183fed211 100755 --- a/src/views/datatable/DataTableDemo.vue +++ b/src/views/datatable/DataTableDemo.vue @@ -13,7 +13,7 @@ dataKey="id" :rowHover="true" v-model:selection="selectedCustomers" v-model:filters="filters" filterDisplay="menu" :loading="loading" paginatorTemplate="FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink CurrentPageReport RowsPerPageDropdown" :rowsPerPageOptions="[10,25,50]" currentPageReportTemplate="Showing {first} to {last} of {totalRecords} entries" - :globalFilterFields="['name','country.name','representative.name','status']"> + :globalFilterFields="['name','country.name','representative.name','status']" responsiveLayout="scroll"> - + - + - + @@ -72,7 +72,7 @@ - + @@ -80,7 +80,7 @@ - + @@ -95,7 +95,7 @@ - + @@ -107,7 +107,7 @@
- + diff --git a/src/views/datatable/DataTableDoc.vue b/src/views/datatable/DataTableDoc.vue index fa9fa9047..133bb9e92 100755 --- a/src/views/datatable/DataTableDoc.vue +++ b/src/views/datatable/DataTableDoc.vue @@ -2611,7 +2611,7 @@ export default { dataKey="id" :rowHover="true" v-model:selection="selectedCustomers" v-model:filters="filters" filterDisplay="menu" :loading="loading" paginatorTemplate="FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink CurrentPageReport RowsPerPageDropdown" :rowsPerPageOptions="[10,25,50]" currentPageReportTemplate="Showing {first} to {last} of {totalRecords} entries" - :globalFilterFields="['name','country.name','representative.name','status']"> + :globalFilterFields="['name','country.name','representative.name','status']" responsiveLayout="scroll"> <template #header> <div class="p-d-flex p-jc-between p-ai-center"> <h5 class="p-m-0">Customers</h5> @@ -2627,8 +2627,8 @@ export default { <template #loading> Loading customers data. Please wait. </template> - <Column selectionMode="multiple" headerStyle="width: 3rem"></Column> - <Column field="name" header="Name" sortable> + <Column selectionMode="multiple" style="min-width: 3rem"></Column> + <Column field="name" header="Name" sortable style="min-width: 14rem"> <template #body="{data}"> {{data.name}} </template> @@ -2636,7 +2636,7 @@ export default { <InputText type="text" v-model="filterModel.value" class="p-column-filter" placeholder="Search by name"/> </template> </Column> - <Column field="country.name" header="Country" sortable filterMatchMode="contains"> + <Column field="country.name" header="Country" sortable filterMatchMode="contains" style="min-width: 14rem"> <template #body="{data}"> <img src="../../assets/images/flag_placeholder.png" :class="'flag flag-' + data.country.code" width="30" /> <span class="image-text">{{data.country.name}}</span> @@ -2645,7 +2645,7 @@ export default { <InputText type="text" v-model="filterModel.value" class="p-column-filter" placeholder="Search by country"/> </template> </Column> - <Column header="Agent" sortable filterField="representative" sortField="representative.name" :showFilterMatchModes="false" :filterMenuStyle="{'width':'14rem'}"> + <Column header="Agent" sortable filterField="representative" sortField="representative.name" :showFilterMatchModes="false" :filterMenuStyle="{'width':'14rem'}" style="min-width: 14rem"> <template #body="{data}"> <img :alt="data.representative.name" :src="'demo/images/avatar/' + data.representative.image" width="32" style="vertical-align: middle" /> <span class="image-text">{{data.representative.name}}</span> @@ -2662,7 +2662,7 @@ export default { </MultiSelect> </template> </Column> - <Column field="date" header="Date" sortable dataType="date"> + <Column field="date" header="Date" sortable dataType="date" style="min-width: 8rem"> <template #body="{data}"> {{formatDate(data.date)}} </template> @@ -2670,7 +2670,7 @@ export default { <Calendar v-model="filterModel.value" dateFormat="mm/dd/yy" placeholder="mm/dd/yyyy" /> </template> </Column> - <Column field="balance" header="Balance" sortable dataType="numeric"> + <Column field="balance" header="Balance" sortable dataType="numeric" style="min-width: 8rem"> <template #body="{data}"> {{formatCurrency(data.balance)}} </template> @@ -2678,7 +2678,7 @@ export default { <InputNumber v-model="filterModel.value" mode="currency" currency="USD" locale="en-US" /> </template> </Column> - <Column field="status" header="Status" sortable :filterMenuStyle="{'width':'14rem'}"> + <Column field="status" header="Status" sortable :filterMenuStyle="{'width':'14rem'}" style="min-width: 10rem"> <template #body="{data}"> <span :class="'customer-badge status-' + data.status">{{data.status}}</span> </template> @@ -2693,7 +2693,7 @@ export default { </Dropdown> </template> </Column> - <Column field="activity" header="Activity" sortable :showFilterMatchModes="false"> + <Column field="activity" header="Activity" sortable :showFilterMatchModes="false" style="min-width: 10rem"> <template #body="{data}"> <ProgressBar :value="data.activity" :showValue="false" /> </template> @@ -2705,7 +2705,7 @@ export default { </div> </template> </Column> - <Column headerStyle="width: 8rem; text-align: center" bodyStyle="text-align: center; overflow: visible"> + <Column headerStyle="width: 4rem; text-align: center" bodyStyle="text-align: center; overflow: visible"> <template #body> <Button type="button" icon="pi pi-cog"></Button> </template> @@ -2798,7 +2798,7 @@ export default { dataKey="id" :rowHover="true" v-model:selection="selectedCustomers" v-model:filters="filters" filterDisplay="menu" :loading="loading" paginatorTemplate="FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink CurrentPageReport RowsPerPageDropdown" :rowsPerPageOptions="[10,25,50]" currentPageReportTemplate="Showing {first} to {last} of {totalRecords} entries" - :globalFilterFields="['name','country.name','representative.name','status']"> + :globalFilterFields="['name','country.name','representative.name','status']" responsiveLayout="scroll"> - + @@ -2823,7 +2823,7 @@ export default { - + - + - + @@ -2857,7 +2857,7 @@ export default { - + @@ -2865,7 +2865,7 @@ export default { - + @@ -2880,7 +2880,7 @@ export default { - + @@ -2892,7 +2892,7 @@ export default { - + diff --git a/src/views/datatable/DataTableEditDemo.vue b/src/views/datatable/DataTableEditDemo.vue index a5b8aba6f..60a36a42d 100755 --- a/src/views/datatable/DataTableEditDemo.vue +++ b/src/views/datatable/DataTableEditDemo.vue @@ -13,7 +13,7 @@
Basic Cell Editing

Simple editors with v-model.

- +