Fix search positioning
This commit is contained in:
@@ -332,7 +332,9 @@ export function SearchScreenInner({
|
|||||||
tabBarPosition="top"
|
tabBarPosition="top"
|
||||||
onPageSelected={onPageSelected}
|
onPageSelected={onPageSelected}
|
||||||
renderTabBar={props => (
|
renderTabBar={props => (
|
||||||
<CenteredView sideBorders style={pal.border}>
|
<CenteredView
|
||||||
|
sideBorders
|
||||||
|
style={[pal.border, pal.view, styles.tabBarContainer]}>
|
||||||
<TabBar items={SECTIONS_LOGGEDIN} {...props} />
|
<TabBar items={SECTIONS_LOGGEDIN} {...props} />
|
||||||
</CenteredView>
|
</CenteredView>
|
||||||
)}
|
)}
|
||||||
@@ -373,7 +375,9 @@ export function SearchScreenInner({
|
|||||||
tabBarPosition="top"
|
tabBarPosition="top"
|
||||||
onPageSelected={onPageSelected}
|
onPageSelected={onPageSelected}
|
||||||
renderTabBar={props => (
|
renderTabBar={props => (
|
||||||
<CenteredView sideBorders style={pal.border}>
|
<CenteredView
|
||||||
|
sideBorders
|
||||||
|
style={[pal.border, pal.view, styles.tabBarContainer]}>
|
||||||
<TabBar items={SECTIONS_LOGGEDOUT} {...props} />
|
<TabBar items={SECTIONS_LOGGEDOUT} {...props} />
|
||||||
</CenteredView>
|
</CenteredView>
|
||||||
)}
|
)}
|
||||||
@@ -529,6 +533,7 @@ export function SearchScreen(
|
|||||||
style={[
|
style={[
|
||||||
styles.header,
|
styles.header,
|
||||||
pal.border,
|
pal.border,
|
||||||
|
pal.view,
|
||||||
isTabletOrDesktop && {paddingTop: 10},
|
isTabletOrDesktop && {paddingTop: 10},
|
||||||
]}
|
]}
|
||||||
sideBorders={isTabletOrDesktop}>
|
sideBorders={isTabletOrDesktop}>
|
||||||
@@ -652,18 +657,19 @@ function scrollToTopWeb() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const HEADER_HEIGHT = 50
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
const styles = StyleSheet.create({
|
||||||
container: {
|
|
||||||
// @ts-ignore web only
|
|
||||||
position: 'sticky',
|
|
||||||
top: 0,
|
|
||||||
zIndex: 1,
|
|
||||||
},
|
|
||||||
header: {
|
header: {
|
||||||
flexDirection: 'row',
|
flexDirection: 'row',
|
||||||
alignItems: 'center',
|
alignItems: 'center',
|
||||||
paddingHorizontal: 12,
|
paddingHorizontal: 12,
|
||||||
paddingVertical: 4,
|
paddingVertical: 4,
|
||||||
|
height: HEADER_HEIGHT,
|
||||||
|
// @ts-ignore web only
|
||||||
|
position: isWeb ? 'sticky' : '',
|
||||||
|
top: 0,
|
||||||
|
zIndex: 1,
|
||||||
},
|
},
|
||||||
headerMenuBtn: {
|
headerMenuBtn: {
|
||||||
width: 30,
|
width: 30,
|
||||||
@@ -693,4 +699,10 @@ const styles = StyleSheet.create({
|
|||||||
headerCancelBtn: {
|
headerCancelBtn: {
|
||||||
paddingLeft: 10,
|
paddingLeft: 10,
|
||||||
},
|
},
|
||||||
|
tabBarContainer: {
|
||||||
|
// @ts-ignore web only
|
||||||
|
position: isWeb ? 'sticky' : '',
|
||||||
|
top: isWeb ? HEADER_HEIGHT : 0,
|
||||||
|
zIndex: 1,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user