Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RNMobile] elevate scrollEnabled prop to BlockList #21505

Merged
merged 2 commits into from
Apr 16, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ export class BlockList extends Component {
isReadOnly,
isRootList,
horizontal,
scrollEnabled,
shouldShowInsertionPointBefore,
shouldShowInsertionPointAfter,
marginVertical = styles.defaultBlock.marginTop,
Expand Down Expand Up @@ -140,7 +139,7 @@ export class BlockList extends Component {
! isRootList && styles.overflowVisible,
] }
horizontal={ horizontal }
scrollEnabled={ scrollEnabled }
scrollEnabled={ isRootList }
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one should lock scrolling of nested InnerBlocks. However I would like to make sure if it do not block something that we don't want to block.

The reason to introduce that prop lays in Column block PR . In nested structure there was possibility to drag content of Column or Group block.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you comment this line completely you will notice the behaviour presented on GIF in the description

contentContainerStyle={
horizontal && styles.horizontalContentContainer
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@ class InnerBlocks extends Component {
renderAppender,
__experimentalMoverDirection,
horizontal,
scrollEnabled,
contentResizeMode,
contentStyle,
onAddBlock,
Expand All @@ -137,7 +136,6 @@ class InnerBlocks extends Component {
__experimentalMoverDirection
}
horizontal={ horizontal }
scrollEnabled={ scrollEnabled }
contentResizeMode={ contentResizeMode }
contentStyle={ contentStyle }
onAddBlock={ onAddBlock }
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/column/edit.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ function ColumnEdit( {
] }
>
<InnerBlocks
scrollEnabled={ false }
renderAppender={
isSelected && InnerBlocks.ButtonBlockAppender
}
Expand Down
1 change: 0 additions & 1 deletion packages/block-library/src/columns/edit.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ function ColumnsEditContainer( {
columnsInRow > 1 ? 'horizontal' : undefined
}
horizontal={ true }
scrollEnabled={ false }
allowedBlocks={ ALLOWED_BLOCKS }
contentResizeMode="stretch"
onAddBlock={ onAddNextColumn }
Expand Down
3 changes: 0 additions & 3 deletions packages/block-library/src/group/edit.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ function GroupEdit( { hasInnerBlocks, isSelected, getStylesFromColorScheme } ) {
<View style={ isSelected && hasInnerBlocks && styles.innerBlocks }>
<InnerBlocks
renderAppender={ isSelected && InnerBlocks.ButtonBlockAppender }
flatListProps={ {
scrollEnabled: false,
} }
/>
</View>
);
Expand Down