草庐IT

selectionState

全部标签

javascript - 如何使用 react-native 的 TextInput 的 `selectionState` Prop ?

我正在构建一个reactnative应用程序。我有一个,当发生某些事情时,我希望引起变得专注。上唯一记录的方法实例是.isFocused()和.clear()--似乎都不是我要找的。我显然想要.focus().我发现这个仅限iOSselectedStateProp似乎提供了我正在寻找的东西。Thedocs说:iOSselectionStateDocumentSelectionStateAninstanceofDocumentSelectionState,thisissomestatethatisresponsibleformaintainingselectioninformationf