diff --git a/src/components/Custom/AnimatedBottomBar.js b/src/components/Custom/AnimatedBottomBar.js index 5729253..ac5cf7c 100644 --- a/src/components/Custom/AnimatedBottomBar.js +++ b/src/components/Custom/AnimatedBottomBar.js @@ -41,8 +41,9 @@ class AnimatedBottomBar extends React.Component { this.displayModeIcons[DISPLAY_MODES.MONTH] = "calendar-range"; } - shouldComponentUpdate(nextProps: Props) { - return (nextProps.currentGroup !== this.props.currentGroup); + shouldComponentUpdate(nextProps: Props, nextState: State) { + return (nextProps.currentGroup !== this.props.currentGroup) + || (nextState.currentMode !== this.state.currentMode); } onScroll = (event: Object) => { @@ -85,20 +86,9 @@ class AnimatedBottomBar extends React.Component { style={{marginLeft: 5}} onPress={() => this.props.onPress('today', undefined)}/> - + this.props.navigation.navigate('group-select')} /> @@ -134,6 +124,19 @@ const styles = StyleSheet.create({ alignItems: 'center', borderRadius: 50, elevation: 2, + }, + fabContainer: { + position: "absolute", + left: 0, + right: 0, + alignItems: "center", + width: '100%', + height: '100%' + }, + fab: { + position: 'absolute', + alignSelf: 'center', + top: -10, } });