diff --git a/src/assets/styles/app.scss b/src/assets/styles/app.scss index d2fc70f1a..0f98f091c 100644 --- a/src/assets/styles/app.scss +++ b/src/assets/styles/app.scss @@ -40,6 +40,18 @@ border-top-right-radius: $val; } +@keyframes pulse { + 0% { + background-color: rgba(165, 165, 165, 0.1) + } + 50% { + background-color: rgba(165, 165, 165, 0.3) + } + 100% { + background-color: rgba(165, 165, 165, 0.1) + } +} + $focusBorderColor:#8dcdff; body { diff --git a/src/components/datatable/DataTable.vue b/src/components/datatable/DataTable.vue index 35adad73e..00616de67 100644 --- a/src/components/datatable/DataTable.vue +++ b/src/components/datatable/DataTable.vue @@ -1507,7 +1507,7 @@ export default { if(this.virtualScrollTimer) { clearTimeout(this.virtualScrollTimer); } - + this.virtualScrollTimer = setTimeout(() => { this.$emit('virtual-scroll', { first: (event.page - 1) * this.rows, diff --git a/src/components/datatable/ScrollableView.vue b/src/components/datatable/ScrollableView.vue index 828d48e92..24fe5748d 100644 --- a/src/components/datatable/ScrollableView.vue +++ b/src/components/datatable/ScrollableView.vue @@ -22,6 +22,7 @@ +
@@ -40,6 +41,7 @@ \ No newline at end of file diff --git a/src/components/datatable/TableLoadingBody.vue b/src/components/datatable/TableLoadingBody.vue new file mode 100644 index 000000000..cb230ee08 --- /dev/null +++ b/src/components/datatable/TableLoadingBody.vue @@ -0,0 +1,29 @@ + + + \ No newline at end of file diff --git a/src/views/datatable/DataTableScrollDemo.vue b/src/views/datatable/DataTableScrollDemo.vue index e71b73fab..2c479d16a 100644 --- a/src/views/datatable/DataTableScrollDemo.vue +++ b/src/views/datatable/DataTableScrollDemo.vue @@ -21,10 +21,26 @@

Virtual Scroll

- - - - + + + + + + + + + + + +

Horizontal and Vertical

@@ -154,7 +170,7 @@ export default { setTimeout(() => { this.lazyCars = this.loadChunk(0, 40); - this.lazyTotalRecords = 250000; + this.lazyTotalRecords = 250000; }, 250); }, methods: { @@ -162,21 +178,21 @@ export default { let chunk = []; for (let i = 0; i < length; i++) { chunk[i] = {...this.inmemoryData[i], ...{vin: (index + i)}}; - } + } return chunk; }, onVirtualScroll(event) { /* - For demo purposes keep loading the same dataset, - in a real production application, this data should come from server by building the query with LazyLoadEvent options + For demo purposes keep loading the same dataset, + in a real production application, this data should come from server by building the query with LazyLoadEvent options */ setTimeout(() => { //last chunk if (event.first === 249980) this.lazyCars = this.loadChunk(event.first, 20) - else - this.lazyCars = this.loadChunk(event.first, event.rows) + else + this.lazyCars = this.loadChunk(event.first, event.rows) }, 250); } }, @@ -184,4 +200,15 @@ export default { 'DataTableSubMenu': DataTableSubMenu } } - \ No newline at end of file + + + \ No newline at end of file