Property 'getResizerProps' does not exist on type 'HeaderGroup<object>'
See original GitHub issueDescribe the bug (required)
getResizerProps()
property does not work when using TypeScript with @types/react-table@7.0.26
Steps To Reproduce (required)
const tableInstance = useTable(
{ columns, data },
useBlockLayout,
useResizeColumns,
);
const {
getTableProps,
headerGroups,
} = tableInstance;
return (
// apply the table props
<div {...getTableProps()} className="table">
<div className="table-header">
{
headerGroups.map(headerGroup => (
<div {...headerGroup.getHeaderGroupProps()} className="table-header-row">
{ headerGroup.headers.map(column => (
<div {...column.getHeaderProps()} className="th">
{column.render('Header')}
<div
{...column.getResizerProps()} //Property 'getResizerProps' does not exist on type 'HeaderGroup<object>'. TS2339
/>
</div>
))}
</div>
))
}
</div>
</div>
)
Expected behavior (Recommended)
getResizerProps
should exist on column
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:7
Top Results From Across the Web
Property 'getResizerProps' does not exist on type ... - GitHub
Describe the bug (required) getResizerProps() property does not work when using TypeScript with @types/react-table@7.0.26 Steps To Reproduce ...
Read more >Developers - Property 'getResizerProps' does not exist on type ...
Describe the bug (required) getResizerProps() property does not work when using TypeScript with @types/react-table@7.0.26.
Read more >react-table and TypeScript: how do custom properties on ...
TypeScript complains about these two properties that I've added to columns : Property 'className' does not exist on type 'ColumnInstance<object> ...
Read more >property 'classname' does not exist on type 'eventtarget'.
Typescript :Property 'className' does not exist on type 'EventTarget' ... One way to fix this error is to type cast the target object...
Read more >React-table 7 Tutorial - Medium
headerGroups is an object that contains an array of headers and decorators getHeaderGroupProps and getFooterGroupProps.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Simply add the bellow lines in a
.d.ts
file:This issue is being marked as stale (no activity in the last 14 days)