useFlexLayout and Footer not receiving correct props #2379
-
Hello, I wanted to open this more of as a discussion at first in case I'm just misusing this. 😄 Currently For example this does not get flex layout props: <div className="tfoot">
{footerGroups.map((footerGroup) => (
<div className="tr" {...footerGroup.getFooterGroupProps()}>
{footerGroup.headers.map((column) => (
<div className="td" {...column.getFooterProps()}>
{column.render("Footer")}
</div>
))}
</div>
))}
</div> Generates: <div class="tr"><div class="td" colspan="1">
<div class="td" colspan="1">Test</div>
</div> Instead calling the header props does get me the flex props: <div className="tfoot">
{footerGroups.map((footerGroup) => (
<div className="tr" {...footerGroup.getHeaderGroupProps()}>
{footerGroup.headers.map((column) => (
<div className="td" {...column.getHeaderProps()}>
{column.render("Footer")}
</div>
))}
</div>
))}
</div> Generates: <div class="tr" role="row" style="display: flex; flex: 1 0 auto; min-width: 0px;">
<div class="td" colspan="1" role="columnheader" style="box-sizing: border-box; flex: 150 0 auto; min-width: 0px; width: 150px; position: relative;">Test</div>
</div> |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
@tastypackets I ran into the same issue with For hooks => {
hooks.getFooterGroupProps.push((props, { instance }) => [
props,
{
style: {
display: 'flex',
width: `${instance.totalColumnsWidth}px`,
},
},
]);
hooks.getFooterProps.push((props, { column }) => [
props,
{
style: {
display: 'inline-block',
boxSizing: 'border-box',
width: `${column.totalWidth}px`,
},
},
]);
}, |
Beta Was this translation helpful? Give feedback.
-
@tastypackets The PR is available here: #2430 |
Beta Was this translation helpful? Give feedback.
-
This PR is merged and available in |
Beta Was this translation helpful? Give feedback.
@tastypackets The PR is available here: #2430