...
|
...
|
@@ -27,6 +27,7 @@ export default class Home extends Component { |
|
|
this._renderRow = this._renderRow.bind(this);
|
|
|
this._renderSectionHeader = this._renderSectionHeader.bind(this);
|
|
|
this._floorCellRender = this._floorCellRender.bind(this);
|
|
|
this._clickCategorySelector = this._clickCategorySelector.bind(this);
|
|
|
|
|
|
this.dataSource = new ListView.DataSource({
|
|
|
rowHasChanged: (r1, r2) => !Immutable.is(r1, r2),
|
...
|
...
|
@@ -44,6 +45,7 @@ export default class Home extends Component { |
|
|
<CategorySelector
|
|
|
data={categoryList}
|
|
|
selectedCategoryIndex={selectedCategoryIndex}
|
|
|
changeCategorySelectorTitle={this._clickCategorySelector}
|
|
|
onPressCategory={(rowData, rowID) => {
|
|
|
this.props.onPressCategory && this.props.onPressCategory(rowData, rowID);
|
|
|
}}
|
...
|
...
|
@@ -55,6 +57,16 @@ export default class Home extends Component { |
|
|
}
|
|
|
}
|
|
|
|
|
|
_clickCategorySelector(rowData) {
|
|
|
let params = {
|
|
|
animated: true,
|
|
|
sectionIndex: 1,
|
|
|
itemIndex: 0,
|
|
|
viewOffset: 44
|
|
|
}
|
|
|
this.sectionList.scrollToLocation(params);
|
|
|
}
|
|
|
|
|
|
_renderRow(item) {
|
|
|
let rowID = item.index;
|
|
|
let rowData = item.item;
|
...
|
...
|
@@ -174,9 +186,7 @@ export default class Home extends Component { |
|
|
isShowGuide={this.props.isShowGuide}
|
|
|
hiddenGuideDialog={this.props.hiddenGuideDialog}/>
|
|
|
<SectionList
|
|
|
ref={(c) => {
|
|
|
this.listView = c;
|
|
|
}}
|
|
|
ref={(ref) => this.sectionList = ref}
|
|
|
sections={dataSource}
|
|
|
renderSectionHeader={this._renderSectionHeader}
|
|
|
yh_viewVisible={true}
|
...
|
...
|
|