Skip to content

Commit

Permalink
fix(HeaderCell): fix type extension (#448)
Browse files Browse the repository at this point in the history
```
node_modules/rsuite-table/lib/HeaderCell.d.ts:4:18 - error TS2430: Interface 'HeaderCellProps' incorrectly extends interface 'InnerCellProps'.
  Types of property 'onResize' are incompatible.
    Type '((columnWidth?: number | undefined, dataKey?: string | undefined) => void) | undefined' is not assignable to type 'ReactEventHandler<HTMLElement> | undefined'.
      Type '(columnWidth?: number | undefined, dataKey?: string | undefined) => void' is not assignable to type 'ReactEventHandler<HTMLElement>'.
        Types of parameters 'columnWidth' and 'event' are incompatible.
          Type 'SyntheticEvent<HTMLElement, Event>' is not assignable to type 'number'.

4 export interface HeaderCellProps extends InnerCellProps {
                   ~~~~~~~~~~~~~~~
```
  • Loading branch information
b1rdex committed Aug 31, 2023
1 parent 5410454 commit a8c9246
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/HeaderCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import ColumnResizeHandler, { FixedType } from './ColumnResizeHandler';
import { useUpdateEffect, useClassNames } from './utils';
import Cell, { InnerCellProps } from './Cell';

export interface HeaderCellProps extends InnerCellProps {
export interface HeaderCellProps extends Omit<InnerCellProps, 'onResize'> {
index?: number;
minWidth?: number;
sortColumn?: string;
Expand Down

1 comment on commit a8c9246

@vercel
Copy link

@vercel vercel bot commented on a8c9246 Aug 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.