Skip to content

Commit

Permalink
FIX (types): fix item type for IItemRenderer (#47)
Browse files Browse the repository at this point in the history
Fix IItemRenderer interface to make item type generic and update addItem interface to include item as a parameter
  • Loading branch information
lopesc authored and sanusart committed Nov 12, 2019
1 parent 2dd4013 commit 4606eb5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export interface IState {
export interface IMethods {
removeItem: () => void;
dropDown: () => void;
addItem: () => void;
addItem: (item: IItemRenderer['item']) => void;
setSearch: () => void;
getInputSize: () => void;
toggleSelectAll: () => void;
Expand Down Expand Up @@ -43,8 +43,8 @@ export interface IKeyDown {
setState?: () => void;
}

export interface IItemRenderer {
item?: number;
export interface IItemRenderer<T> {
item?: T;
itemIndex?: number;
props?: ISelectProps;
state?: IState;
Expand Down

0 comments on commit 4606eb5

Please sign in to comment.