Skip to content

Commit

Permalink
Refactor #500 - For DataTable and TreeTable
Browse files Browse the repository at this point in the history
  • Loading branch information
mertsincan committed Sep 27, 2020
1 parent 92f3030 commit ba6f6bf
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions src/components/datatable/DataTable.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div :class="containerClass">
<div :class="containerClass" data-scrollselectors=".p-datatable-scrollable-body, .p-datatable-unfrozen-view .p-datatable-scrollable-body">
<slot></slot>
<div class="p-datatable-loading-overlay p-component-overlay" v-if="loading">
<i :class="loadingIconClass"></i>
Expand Down Expand Up @@ -937,9 +937,9 @@ export default {
let headerInitiated = false;
for (let i = 0; i < this.columns.length; i++) {
let column = this.columns[i];
if (column.props?.exportable !== false && column.props?.field) {
if (headerInitiated)
if (headerInitiated)
csv += this.csvSeparator;
else
headerInitiated = true;
Expand All @@ -956,7 +956,7 @@ export default {
for (let i = 0; i < this.columns.length; i++) {
let column = this.columns[i];
if (column.props?.exportable !== false && column.props?.field) {
if (rowInitiated)
if (rowInitiated)
csv += this.csvSeparator;
else
rowInitiated = true;
Expand Down Expand Up @@ -1652,7 +1652,7 @@ export default {
columns() {
let cols = [];
let children = this.$slots.default();
children.forEach(child => {
if (child.dynamicChildren)
cols = [...cols, ...child.children];
Expand All @@ -1671,7 +1671,7 @@ export default {
return [...orderedColumns, ...cols.filter((item) => orderedColumns.indexOf(item) < 0)];
}
return cols;
},
frozenColumns() {
Expand Down
4 changes: 2 additions & 2 deletions src/components/treetable/TreeTable.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div :class="containerClass">
<div :class="containerClass" data-scrollselectors=".p-treetable-scrollable-body">
<div class="p-treetable-loading" v-if="loading">
<div class="p-treetable-loading-overlay p-component-overlay">
<i :class="loadingIconClass"></i>
Expand Down Expand Up @@ -785,7 +785,7 @@ export default {
columns() {
let cols = [];
let children = this.$slots.default();
children.forEach(child => {
if (child.dynamicChildren)
cols = [...cols, ...child.children];
Expand Down

0 comments on commit ba6f6bf

Please sign in to comment.