Skip to content

Property 'getResizerProps' does not exist on type 'HeaderGroup<object>'  #2952

@chyyran

Description

@chyyran

Describe 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions