-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: This completes the Picker stack. Use a handwritten view config to avoid calling `requireNativeComponent` in Bridgeless mode. Differential Revision: D23663596 fbshipit-source-id: 5d0811014fd6f66956803a1db5fee8fd1119d5bc
- Loading branch information
1 parent
3113e47
commit 8f45db3
Showing
2 changed files
with
54 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/** | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* @flow strict-local | ||
* @format | ||
*/ | ||
|
||
'use strict'; | ||
|
||
import ReactNativeViewViewConfig from '../../Components/View/ReactNativeViewViewConfig'; | ||
import type {ReactNativeBaseComponentViewConfig} from '../../Renderer/shims/ReactNativeTypes'; | ||
|
||
const RCTPickerViewConfig = { | ||
uiViewClassName: 'RCTPicker', | ||
bubblingEventTypes: { | ||
topChange: { | ||
phasedRegistrationNames: { | ||
bubbled: 'onChange', | ||
captured: 'onChangeCapture', | ||
}, | ||
}, | ||
}, | ||
directEventTypes: {}, | ||
validAttributes: { | ||
...ReactNativeViewViewConfig.validAttributes, | ||
color: {process: require('../../StyleSheet/processColor')}, | ||
fontFamily: true, | ||
fontSize: true, | ||
fontStyle: true, | ||
fontWeight: true, | ||
items: true, | ||
onChange: true, | ||
selectedIndex: true, | ||
textAlign: true, | ||
}, | ||
}; | ||
|
||
module.exports = (RCTPickerViewConfig: ReactNativeBaseComponentViewConfig<>); |