From 7b7e80d2db11d8894dacc1834dd872cf53fdf817 Mon Sep 17 00:00:00 2001 From: Cagatay Civici Date: Thu, 24 Sep 2020 15:34:54 +0300 Subject: [PATCH] Doc update to cover sync to v-model migration --- src/views/datatable/DataTableCrudDemo.vue | 8 ++--- src/views/datatable/DataTableDoc.vue | 32 +++++++++---------- .../datatable/DataTableRowExpandDemo.vue | 2 +- src/views/datatable/DataTableRowGroupDemo.vue | 2 +- src/views/datatable/DataTableScrollDemo.vue | 2 +- src/views/datatable/DataTableStateDemo.vue | 8 ++--- src/views/fieldset/FieldsetDoc.vue | 4 +-- src/views/galleria/GalleriaAdvancedDemo.vue | 2 +- src/views/galleria/GalleriaFullScreenDemo.vue | 8 ++--- .../galleria/GalleriaProgrammaticDemo.vue | 2 +- .../OrganizationChartDoc.vue | 6 ++-- src/views/overlaypanel/OverlayPanelDoc.vue | 2 +- src/views/paginator/PaginatorDoc.vue | 14 ++++---- src/views/panel/PanelDoc.vue | 4 +-- src/views/tabview/TabViewDoc.vue | 8 ++--- src/views/tree/TreeDoc.vue | 14 ++++---- src/views/tree/TreeSelectionDemo.vue | 10 +++--- src/views/treetable/TreeTableDoc.vue | 16 +++++----- .../treetable/TreeTableSelectionDemo.vue | 10 +++--- 19 files changed, 77 insertions(+), 77 deletions(-) diff --git a/src/views/datatable/DataTableCrudDemo.vue b/src/views/datatable/DataTableCrudDemo.vue index f858dc9ec..156525657 100755 --- a/src/views/datatable/DataTableCrudDemo.vue +++ b/src/views/datatable/DataTableCrudDemo.vue @@ -158,7 +158,7 @@ </template> </Toolbar> -<DataTable ref="dt" :value="products" :selection.sync="selectedProducts" dataKey="id" +<DataTable ref="dt" :value="products" v-model:selection="selectedProducts" dataKey="id" :paginator="true" :rows="10" :filters="filters" paginatorTemplate="FirstPageLink PrevPageLink PageLinks NextPageLink LastPageLink CurrentPageReport RowsPerPageDropdown" :rowsPerPageOptions="[5,10,25]" currentPageReportTemplate="Showing {first} to {last} of {totalRecords} products"> @@ -205,7 +205,7 @@ </DataTable> </div> -<Dialog :visible.sync="productDialog" :style="{width: '450px'}" header="Product Details" :modal="true" class="p-fluid"> +<Dialog v-model:visible="productDialog" :style="{width: '450px'}" header="Product Details" :modal="true" class="p-fluid"> <img :src="'demo/images/product/' + product.image" :alt="product.image" class="product-image" v-if="product.image" /> <div class="p-field"> <label for="name">Name</label> @@ -255,7 +255,7 @@ </template> </Dialog> -<Dialog :visible.sync="deleteProductDialog" :style="{width: '450px'}" header="Confirm" :modal="true"> +<Dialog v-model:visible="deleteProductDialog" :style="{width: '450px'}" header="Confirm" :modal="true"> <div class="confirmation-content"> <i class="pi pi-exclamation-triangle p-mr-3" style="font-size: 2rem" /> <span v-if="product">Are you sure you want to delete <b>{{product.name}}</b>?</span> @@ -266,7 +266,7 @@ </template> </Dialog> - <Dialog :visible.sync="deleteProductsDialog" :style="{width: '450px'}" header="Confirm" :modal="true"> + <Dialog v-model:visible="deleteProductsDialog" :style="{width: '450px'}" header="Confirm" :modal="true"> <div class="confirmation-content"> <i class="pi pi-exclamation-triangle p-mr-3" style="font-size: 2rem" /> <span v-if="product">Are you sure you want to delete the selected products?</span> diff --git a/src/views/datatable/DataTableDoc.vue b/src/views/datatable/DataTableDoc.vue index f9a70771c..a204c1a5c 100755 --- a/src/views/datatable/DataTableDoc.vue +++ b/src/views/datatable/DataTableDoc.vue @@ -459,7 +459,7 @@ export default {

Paginator can also be programmed programmatically using a binding to the first property that defines the index of the first element to display. For example setting first to zero will reset the paginator to the very first page. This property - also supports "sync" keyword in case you'd like your binding to be updated whenever the user changes the page.

+ also supports v-model in case you'd like your binding to be updated whenever the user changes the page.