Added canBecomeKeyView override to RCTScrollView (#60)

This commit is contained in:
Tom Underhill 2019-05-09 09:14:48 -07:00 коммит произвёл GitHub
Родитель f6c76d9f85
Коммит a1a6e4862d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
4 изменённых файлов: 9 добавлений и 0 удалений

Просмотреть файл

@ -120,6 +120,7 @@ class FlatListExample extends React.PureComponent<{}, $FlowFixMeState> {
data={this.state.empty ? [] : filteredData}
debug={this.state.debug}
disableVirtualization={!this.state.virtualized}
acceptsKeyboardFocus={true} // TODO(macOS ISS#2323203)
enableSelectionOnKeyPress={true}
onSelectionEntered={this._handleSelectionEntered}
getItemLayout={

Просмотреть файл

@ -74,6 +74,7 @@ class ItemComponent extends React.PureComponent<{
tvParallaxProperties={{
pressMagnification: 1.1,
}}
acceptsKeyboardFocus={false} // TODO(macOS ISS#2323203)
style={horizontal ? styles.horizItem : styles.item}>
<View
style={[

Просмотреть файл

@ -112,6 +112,8 @@ class RNTesterExampleList extends React.Component<Props, $FlowFixMeState> {
enableEmptySections={true}
itemShouldUpdate={this._itemShouldUpdate}
keyboardShouldPersistTaps="handled"
acceptsKeyboardFocus={true} // TODO(macOS ISS#2323203)
enableSelectionOnKeyPress={true} // TODO(macOS ISS#2323203)
automaticallyAdjustContentInsets={false}
keyboardDismissMode="on-drag"
renderSectionHeader={renderSectionHeader}

Просмотреть файл

@ -520,6 +520,11 @@ RCT_NOT_IMPLEMENTED(- (instancetype)init)
}
#if TARGET_OS_OSX // [TODO(macOS ISS#2323203)
- (BOOL)canBecomeKeyView
{
return [self acceptsKeyboardFocus];
}
- (CGRect)focusRingMaskBounds
{
return [self bounds];