...
|
...
|
@@ -175,7 +175,12 @@ export default class Product extends Component { |
|
|
if (productList.size == 0) {
|
|
|
return null;
|
|
|
}
|
|
|
return (<TabHeader
|
|
|
let {selectedProductList, categoryList, selectedCategoryIndex} = commonProduct;
|
|
|
let isShow = currentTab === 'common' && selectedProductList.size > 0;
|
|
|
|
|
|
return (
|
|
|
<View>
|
|
|
<TabHeader
|
|
|
currentTab={currentTab}
|
|
|
onPressTab={(tab)=>{
|
|
|
if (tab == currentTab) {
|
...
|
...
|
@@ -185,7 +190,17 @@ export default class Product extends Component { |
|
|
this.setState({currentlyOpenSwipeable: null});
|
|
|
this.props.onPressTab && this.props.onPressTab(tab);
|
|
|
}}
|
|
|
/>)
|
|
|
/>
|
|
|
{isShow ? <CategorySelector
|
|
|
data={categoryList}
|
|
|
selectedCategoryIndex={selectedCategoryIndex}
|
|
|
onPressCategory={(rowData, rowID) => {
|
|
|
this.listView && this.listView.scrollTo({x: 0, y: 0, animated: false});
|
|
|
this.props.onPressCategory && this.props.onPressCategory(rowData, rowID);
|
|
|
}}
|
|
|
/> : null}
|
|
|
</View>
|
|
|
)
|
|
|
}
|
|
|
|
|
|
renderSectionHeader(sectionData, sectionID) {
|
...
|
...
|
@@ -255,7 +270,7 @@ export default class Product extends Component { |
|
|
dataSource={this.dataSource.cloneWithRows(dataArray)}
|
|
|
renderRow={this.renderRow}
|
|
|
renderHeader={this.renderHeader}
|
|
|
renderSectionHeader={this.renderSectionHeader}
|
|
|
// renderSectionHeader={this.renderSectionHeader}
|
|
|
onScroll={this.handleScroll}
|
|
|
renderFooter={this.renderFooter}
|
|
|
bounces={dataArray.length > 0}
|
...
|
...
|
|