mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
fix: fixed types props tabIndex in view and userSelect in text (#41312)
Summary: zfrankdesign reported that in RN 0.72.6, they receive warnings that some new props listed in the documents are missing: View tabIndex https://reactnative.dev/docs/view#tabindex-android and Text userSelect https://reactnative.dev/docs/text#userselect. It seems the components accept these props but they were not typed. ## Changelog: [GENERAL] [FIXED] - Missing typings for the props `tabIndex` for **View** and `userSelect` in the **Text** props were added. Pull Request resolved: https://github.com/facebook/react-native/pull/41312 Test Plan: 1. Instantiate a component of type View 1.1. Should add the property tabIndex to the View component. 1.2. Should not see a warning about the missing tabIndex property. 2. Instantiate a component of type Text 2.1. Should add the property userSelect to the Text component. 2.2. Should not see a warning about the missing userSelect property. Reviewed By: NickGerleman Differential Revision: D50982156 Pulled By: lunaleaps fbshipit-source-id: 75b55cfb897738be0cf426912a7c10c7412d5032
This commit is contained in:
committed by
Facebook GitHub Bot
parent
36ef6460f0
commit
b36505bf06
@@ -145,6 +145,17 @@ export interface ViewPropsAndroid {
|
||||
* Whether this `View` should be focusable with a non-touch input device, eg. receive focus with a hardware keyboard.
|
||||
*/
|
||||
focusable?: boolean | undefined;
|
||||
|
||||
/**
|
||||
* Indicates whether this `View` should be focusable with a non-touch input device, eg. receive focus with a hardware keyboard.
|
||||
* See https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex
|
||||
* for more details.
|
||||
*
|
||||
* Supports the following values:
|
||||
* - 0 (View is focusable)
|
||||
* - -1 (View is not focusable)
|
||||
*/
|
||||
tabIndex?: 0 | -1 | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user