Skip to content

Commit

Permalink
Fixed the select onchange method typings (#1152)
Browse files Browse the repository at this point in the history
* Fixed the select onchange method typings

selectedIndex is provided on e.target.selectedIndex, but the typings said it should be accessed through e.selectedIndex, thus not compiling when accessing e.target.selectedIndex

* Update index.tsx
  • Loading branch information
mikaturk authored and prateekbh committed Nov 19, 2018
1 parent d6f2c3a commit 5ee20a5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ts/Select/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ export interface ISelectProps {
hintText?: string;
selectedIndex?: number;

onChange?: (e: Event & {selectedIndex: number}) => void;
onChange?: (
e: Event & {target: EventTarget & {selectedIndex: number}}
) => void;
}

export interface ISelectState {}
Expand Down

0 comments on commit 5ee20a5

Please sign in to comment.