Added canBecomeKeyView override to RCTScrollView (#60)
This commit is contained in:
Родитель
f6c76d9f85
Коммит
a1a6e4862d
|
@ -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];
|
||||
|
|
Загрузка…
Ссылка в новой задаче