Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Commit

Permalink
Use computed prop for the colspan
Browse files Browse the repository at this point in the history
  • Loading branch information
JammingBen committed Jul 21, 2022
1 parent 1d857bb commit 264493c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/molecules/OcTable/OcTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
</oc-tbody>
<tfoot v-if="$slots.footer" class="oc-table-footer">
<tr class="oc-table-footer-row">
<td :colspan="footerColspan" class="oc-table-footer-cell">
<td :colspan="fullColspan" class="oc-table-footer-cell">
<!-- @slot Footer of the table -->
<slot name="footer" />
</td>
Expand Down Expand Up @@ -276,7 +276,7 @@ export default {
return result
},
footerColspan() {
fullColspan() {
return this.fields.length
},
},
Expand Down Expand Up @@ -373,7 +373,7 @@ export default {
},
extractTbodyTrProps(item, index) {
return {
...(this.lazy && { lazy: { colspan: this.fields.length } }),
...(this.lazy && { lazy: { colspan: this.fullColspan } }),
class: [
"oc-tbody-tr",
`oc-tbody-tr-${this.itemDomSelector(item) || index}`,
Expand Down

0 comments on commit 264493c

Please sign in to comment.