-
Notifications
You must be signed in to change notification settings - Fork 24.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Update incorrect
SwitchChangeEvent
type (#34931)
Summary: I noticed that typescript type for `onChange` event of `<Switch/>` was incorrect ```tsx <Switch onChange={(event) => { // TS event.value; // boolean event.nativeEvent.value; //TS2339: Property 'value' does not exist on type 'Event'. // JS console.log(event.nativeEvent); // {value:false,target:87} console.log(event.value); // undefined }} /> ``` ## Changelog [General] [Changed] - Typescript: update incorrect `SwitchChangeEvent` type Pull Request resolved: #34931 Test Plan: ... Reviewed By: lunaleaps Differential Revision: D40240552 Pulled By: skinsshark fbshipit-source-id: 4d39d547778de4ac4dc6c94471f05bfbe157d0e5
- Loading branch information
1 parent
0c5ef57
commit 5dd2f2e
Showing
5 changed files
with
19 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters