UNPKG

tanstack-table-header-rowspan

Version:
3 lines (2 loc) 1.04 kB
function e(e){for(var r=e;;){var t=r.isPlaceholder&&1===r.colSpan&&1===r.subHeaders.length?r.subHeaders[0]:null;if(!t)return r===e?null:r;r=t}}exports.flexTableFooterRowSpan=function(e){var r=e.depth-e.column.depth;return{rowSpan:r,bottomBorderMightBeNeeded:0===e.column.depth,styles:function(t){return{"--rowspan":r,height:"calc(var(--rowspan, 1) * "+t+")",marginBottom:"calc(-1*(var(--rowspan, 1) - 1) * "+t+")",visibility:e.isPlaceholder?"hidden":void 0}}}},exports.flexTableHeaderRowSpan=function(e){var r=e.depth-e.column.depth;return{rowSpan:r,topBorderMightBeNeeded:0===e.column.depth,styles:function(t){return{"--rowspan":r,height:"calc(var(--rowspan, 1) * "+t+")",marginTop:"calc(-1 * (var(--rowspan, 1) - 1) * "+t+")",visibility:e.isPlaceholder?"hidden":void 0}}}},exports.tableFooterRowSpan=function(r){var t=e(r);return 1+(t?t.depth-r.depth:0)>1?null:r.depth-r.column.depth},exports.tableHeaderRowSpan=function(r){var t=e(r);return r.depth-r.column.depth>1?null:1+(t?t.depth-r.depth:0)}; //# sourceMappingURL=rowspan.cjs.map