Elements no longer focusable on tvOS (#26775)
Summary: This PR fixes broken focus on tvOS due to `isTVSelectable` and `tvParallaxProperties` not being available in validAttributes definition object of ReactNativeViewViewConfig ## Changelog [ios] [Fixed] - elements no longer focusable on tvOS Pull Request resolved: https://github.com/facebook/react-native/pull/26775 Test Plan: ``` import React from 'react'; import { StyleSheet, View, Text, TouchableOpacity } from 'react-native'; const parallax = { enabled: true, shiftDistanceY: 2, shiftDistanceX: 2, tiltAngle: 0.05, pressMagnification: 1, magnification: 1.1, }; const Button: () => React$Node = () => ( <TouchableOpacity style={styles.buttonx} tvParallaxProperties={parallax}> <Text> Touchable Button </Text> </TouchableOpacity> ); const App: () => React$Node = () => ( <View style={styles.wrapper}> <Button /> <Button /> <Button /> <Button /> <Button /> <Button /> <Button /> </View> ); const styles = StyleSheet.create({ buttonx: { backgroundColor: 'red', height: 100, width: 500 }, wrapper: { justifyContent: 'center', flex: 1, alignItems: 'center' } }); export default App; ``` ![Oct-08-2019 12-11-19](https://user-images.githubusercontent.com/4638697/66459930-3d7aa880-ea76-11e9-9b94-686094dc8667.gif) Differential Revision: D17845058 Pulled By: TheSavior fbshipit-source-id: b6c71d370efd6cf7763ab3a98bbfe1630f789821
This commit is contained in:
Родитель
38e36b7049
Коммит
b61583a780
|
@ -172,6 +172,7 @@ const ReactNativeViewConfig = {
|
|||
height: true,
|
||||
hitSlop: {diff: (require('../../Utilities/differ/insetsDiffer'): any)},
|
||||
importantForAccessibility: true,
|
||||
isTVSelectable: true,
|
||||
justifyContent: true,
|
||||
left: true,
|
||||
margin: true,
|
||||
|
@ -334,6 +335,7 @@ const ReactNativeViewConfig = {
|
|||
transform: {diff: require('../../Utilities/differ/matricesDiffer')},
|
||||
translateX: true,
|
||||
translateY: true,
|
||||
tvParallaxProperties: true,
|
||||
width: true,
|
||||
zIndex: true,
|
||||
},
|
||||
|
|
Загрузка…
Ссылка в новой задаче