Skip to content

Commit

Permalink
Only enable flex on the root block list
Browse files Browse the repository at this point in the history
  • Loading branch information
koke committed Oct 25, 2019
1 parent cde6c08 commit 630c03d
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,12 @@ export class BlockList extends Component {
}

render() {
const { clearSelectedBlock, blockClientIds, isFullyBordered, title, header, withFooter = true, renderAppender, isFirstBlock, selectedBlockParentId } = this.props;
const { clearSelectedBlock, blockClientIds, isFullyBordered, title, header, withFooter = true, renderAppender, isFirstBlock, selectedBlockParentId, isRootList } = this.props;

const showFloatingToolbar = isFirstBlock && selectedBlockParentId !== '';
return (
<View
style={ { flex: 1 } }
style={ { flex: isRootList ? 1 : 0 } }
onAccessibilityEscape={ clearSelectedBlock }
>
{ showFloatingToolbar && <FloatingToolbar.Slot fillProps={ { innerFloatingToolbar: showFloatingToolbar } } /> }
Expand Down Expand Up @@ -215,6 +215,7 @@ export default compose( [
selectedBlockClientId,
isFirstBlock,
selectedBlockParentId,
isRootList: rootClientId === undefined,
};
} ),
withDispatch( ( dispatch ) => {
Expand Down

0 comments on commit 630c03d

Please sign in to comment.