Resolve ViewConfig conflicts
This commit is contained in:
Родитель
e48d473531
Коммит
77e1f83c28
|
@ -500,7 +500,6 @@ const PlatformBaseViewConfig: PartialViewConfigWithoutName =
|
|||
|
||||
style: ReactNativeStyleAttributes,
|
||||
|
||||
<<<<<<< HEAD
|
||||
// [macOS
|
||||
...(Platform.OS === 'macos' && {
|
||||
acceptsFirstMouse: true,
|
||||
|
@ -509,23 +508,11 @@ const PlatformBaseViewConfig: PartialViewConfigWithoutName =
|
|||
draggedTypes: true,
|
||||
enableFocusRing: true,
|
||||
nextKeyViewTag: true,
|
||||
onBlur: true,
|
||||
onClick: true,
|
||||
onDoubleClick: true,
|
||||
onDragEnter: true,
|
||||
onDragLeave: true,
|
||||
onDrop: true,
|
||||
onFocus: true,
|
||||
onKeyDown: true,
|
||||
onKeyUp: true,
|
||||
onMouseEnter: true,
|
||||
onMouseLeave: true,
|
||||
tooltip: true,
|
||||
validKeysDown: true,
|
||||
validKeysUp: true,
|
||||
}),
|
||||
// macOS]
|
||||
=======
|
||||
...ConditionallyIgnoredEventHandlers({
|
||||
onLayout: true,
|
||||
onMagicTap: true,
|
||||
|
@ -553,9 +540,24 @@ const PlatformBaseViewConfig: PartialViewConfigWithoutName =
|
|||
onTouchMove: true,
|
||||
onTouchEnd: true,
|
||||
onTouchCancel: true,
|
||||
|
||||
// [macOS
|
||||
...(Platform.OS === 'macos' && {
|
||||
onBlur: true,
|
||||
onClick: true,
|
||||
onDoubleClick: true,
|
||||
onDragEnter: true,
|
||||
onDragLeave: true,
|
||||
onDrop: true,
|
||||
onFocus: true,
|
||||
onKeyDown: true,
|
||||
onKeyUp: true,
|
||||
onMouseEnter: true,
|
||||
onMouseLeave: true,
|
||||
}),
|
||||
// macOS]
|
||||
}),
|
||||
>>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5
|
||||
},
|
||||
};
|
||||
|
||||
export default PlatformBaseViewConfig;
|
||||
export default PlatformBaseViewConfig;
|
|
@ -21,8 +21,6 @@ export function DynamicallyInjectedByGestureHandler<T: {...}>(object: T): T {
|
|||
return object;
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
/**
|
||||
* On iOS, ViewManager event declarations generate {eventName}: true entries
|
||||
* in ViewConfig valueAttributes. These entries aren't generated for Android.
|
||||
|
@ -39,7 +37,7 @@ export function ConditionallyIgnoredEventHandlers<T: {[name: string]: true}>(
|
|||
value: T,
|
||||
): T | void {
|
||||
if (
|
||||
Platform.OS === 'ios' &&
|
||||
(Platform.OS === 'ios' || Platform.OS === 'macos') &&
|
||||
!(global.RN$ViewConfigEventValidAttributesDisabled === true)
|
||||
) {
|
||||
return value;
|
||||
|
@ -47,7 +45,6 @@ export function ConditionallyIgnoredEventHandlers<T: {[name: string]: true}>(
|
|||
return undefined;
|
||||
}
|
||||
|
||||
>>>>>>> 49f3f47b1e9b840e4374d46b105604f4d2c22dd5
|
||||
export function isIgnored(value: mixed): boolean {
|
||||
if (typeof value === 'object' && value != null) {
|
||||
return ignoredViewConfigProps.has(value);
|
||||
|
|
Загрузка…
Ссылка в новой задаче