Fixed header jumping on ProximoListScreen.js
This commit is contained in:
부모
02f3ff0ff9
커밋
6b04447535
1개의 변경된 파일과 2개의 추가작업 그리고 15개의 파일을 삭제
|
@ -10,7 +10,6 @@ import ProximoListItem from "../../components/Lists/Proximo/ProximoListItem";
|
|||
import MaterialHeaderButtons, {Item} from "../../components/Overrides/CustomHeaderButton";
|
||||
import {withCollapsible} from "../../utils/withCollapsible";
|
||||
import CustomTabBar from "../../components/Tabbar/CustomTabBar";
|
||||
import AutoHideHandler from "../../utils/AutoHideHandler";
|
||||
|
||||
function sortPrice(a, b) {
|
||||
return a.price - b.price;
|
||||
|
@ -59,7 +58,6 @@ class ProximoListScreen extends React.Component<Props, State> {
|
|||
modalRef: Object;
|
||||
listData: Array<Object>;
|
||||
shouldFocusSearchBar: boolean;
|
||||
hideHandler: AutoHideHandler;
|
||||
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
@ -70,8 +68,6 @@ class ProximoListScreen extends React.Component<Props, State> {
|
|||
currentSortMode: 3,
|
||||
modalCurrentDisplayItem: null,
|
||||
};
|
||||
this.hideHandler = new AutoHideHandler(false);
|
||||
this.hideHandler.addListener(this.onHideChange);
|
||||
}
|
||||
|
||||
|
||||
|
@ -301,17 +297,8 @@ class ProximoListScreen extends React.Component<Props, State> {
|
|||
|
||||
itemLayout = (data, index) => ({length: LIST_ITEM_HEIGHT, offset: LIST_ITEM_HEIGHT * index, index});
|
||||
|
||||
|
||||
onScroll = (event: Object) => {
|
||||
this.hideHandler.onScroll(event);
|
||||
};
|
||||
|
||||
onHideChange = (shouldHide: boolean) => {
|
||||
this.props.navigation.setParams({hideTabBar: shouldHide});
|
||||
}
|
||||
|
||||
render() {
|
||||
const {containerPaddingTop, scrollIndicatorInsetTop, onScrollWithListener} = this.props.collapsibleStack;
|
||||
const {containerPaddingTop, scrollIndicatorInsetTop, onScroll} = this.props.collapsibleStack;
|
||||
return (
|
||||
<View style={{
|
||||
height: '100%'
|
||||
|
@ -330,7 +317,7 @@ class ProximoListScreen extends React.Component<Props, State> {
|
|||
getItemLayout={this.itemLayout}
|
||||
initialNumToRender={10}
|
||||
// Animations
|
||||
onScroll={onScrollWithListener(this.onScroll)}
|
||||
onScroll={onScroll}
|
||||
contentContainerStyle={{
|
||||
paddingTop: containerPaddingTop,
|
||||
paddingBottom: CustomTabBar.TAB_BAR_HEIGHT
|
||||
|
|
불러오는 중…
Reference in a new issue