Fixed #719 - Conditonally rendering columns in DataTable with v-if is throwing error

pull/1237/head
mertsincan 2021-04-30 17:42:00 +03:00
parent d9beae5637
commit 888eb54a4c
1 changed files with 5 additions and 5 deletions

View File

@ -580,7 +580,7 @@ export default {
else { else {
localMatch = this.executeLocalFilter(filterField, data[i], filterMeta); localMatch = this.executeLocalFilter(filterField, data[i], filterMeta);
} }
if (!localMatch) { if (!localMatch) {
break; break;
} }
@ -1619,7 +1619,7 @@ export default {
} }
} }
`; `;
this.styleElement.innerHTML = innerHTML; this.styleElement.innerHTML = innerHTML;
} }
}, },
@ -1659,7 +1659,7 @@ export default {
} }
children.forEach(child => { children.forEach(child => {
if (child.dynamicChildren) if (child.dynamicChildren && child.dynamicChildren.length)
cols = [...cols, ...child.children]; cols = [...cols, ...child.children];
else if (child.type.name === 'column') else if (child.type.name === 'column')
cols.push(child); cols.push(child);
@ -1727,7 +1727,7 @@ export default {
return data; return data;
} }
return []; return [];
} }
}, },
@ -2034,7 +2034,7 @@ export default {
justify-content: center; justify-content: center;
} }
.p-column-filter-add-button .p-button-label, .p-column-filter-add-button .p-button-label,
.p-column-filter-remove-button .p-button-label { .p-column-filter-remove-button .p-button-label {
flex-grow: 0; flex-grow: 0;
} }