react-elastic-carousel icon indicating copy to clipboard operation
react-elastic-carousel copied to clipboard

Wrong type for onChange of ReactElasticCarouselProps

Open iskotar opened this issue 3 years ago • 0 comments

Describe the bug Typescrypt error

export type ItemObject = {
  // Children's props
  object: any;
  index: number;
};

export interface ReactElasticCarouselProps {
  ...
  onChange?: (currentItemObject: ItemObject, currentPageIndex: number) => void;
 ...
}

But actually currentItemObject contains: { item, index}

iskotar avatar Aug 24 '22 05:08 iskotar