Commit 04fbb709 by lhc Committed by peii

fix: bug

(cherry picked from commit e1ed920b)
parent 78aab35c
......@@ -880,14 +880,17 @@ class ChooseProductPage extends Component {
topProcOptionList,
title: '搜索',
setTopProcOptionListCallBack: setTopProcOptionList => {
console.log('click')
setTopProcOptionList.then(topProcOptionList => {
console.log('addSuccess')
this.setState(
{
topProcOptionList: [...topProcOptionList],
},
() => {
this.props.navigation.goBack()
},
// () => {
// console.log('goback')
// this.props.navigation.goBack()
// },
)
})
},
......@@ -916,10 +919,18 @@ class ChooseProductPage extends Component {
topProcOptionList,
title: '搜索',
setTopProcOptionListCallBack: setTopProcOptionList => {
console.log('click')
setTopProcOptionList.then(topProcOptionList => {
this.setState({
topProcOptionList: [...topProcOptionList],
})
console.log('addSuccess')
this.setState(
{
topProcOptionList: [...topProcOptionList],
},
// () => {
// console.log('goback')
// this.props.navigation.goBack()
// },
)
})
},
selfData: {
......
import React, { Component } from 'react'
import { icon_style, list_common_item, safe_view, foundation_color } from '../../../base/BaseStyle'
import { View, StyleSheet, Image, TextInput, SafeAreaView, ScrollView, FlatList } from 'react-native'
import { View, StyleSheet, Image, TextInput, SafeAreaView, ScrollView, FlatList, Button } from 'react-native'
import HeadBackItem from '../../common/HeadBackItem'
import { PicListNoData } from '../../common/CellTextStyle'
import PicTitDetaiCalcu from '../../common/listDataComponent/PicTitDetaiCalcu'
......@@ -12,6 +12,7 @@ import { cloneObject } from '../../../utils/Utils'
// import ChooseCardList from '../../common/listDataComponent/ChooseCardList';
import LoadingModel from '../../common/listDataComponent/LoadingModel'
import { Width } from '../../../base/BaseStyle'
import debounce from 'debounce'
class SearchPage extends Component {
constructor(props) {
super(props)
......@@ -42,6 +43,7 @@ class SearchPage extends Component {
dataList: [],
topActiveIndex: 0,
}
this.inputSearchValue = debounce(this.inputSearchValue.bind(this), 1000)
}
componentDidMount() {
......@@ -248,7 +250,7 @@ class SearchPage extends Component {
}
}),
}
this.props.navigation.goBack()
return Promise.resolve(topProcOptionList)
}
......@@ -295,6 +297,7 @@ class SearchPage extends Component {
tipTextTwoTit={'规格型号'}
listImgIcon={'photos'}
plusCallBack={item => {
console.log('plusCallBack')
setTopProcOptionListCallBack(this.formatToTopProcOptionList(item))
}}
// reduceCallBack={() => this.props.handleAllPlusReduce(item, index)}
......@@ -329,12 +332,16 @@ class SearchPage extends Component {
<SafeAreaView style={safe_view}>
<HeadBackItem title={title} navigation={navigation} />
<View style={list_common_item.ser_cont}>
<TextInput
placeholder={'请输入搜索关键词'}
style={list_common_item.ser_text_input}
// defaultValue={this.state.searchValue}
onChangeText={text => this.inputSearchValue(text)}
/>
<View style={{ display: 'flex' }}>
<TextInput
placeholder={'请输入搜索关键词'}
style={list_common_item.ser_text_input}
// defaultValue={this.state.searchValue}
onChangeText={text => this.inputSearchValue(text)}
/>
{/* <Button title="搜索" onPress={() => this.getSearchData()} /> */}
</View>
<View style={list_common_item.ser_img_box}>
<Image source={require('../../../images/search_icon.png')} style={icon_style} />
</View>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment