| | |
| | | } |
| | | |
| | | resetSearch = (result) => { |
| | | let trigger = false |
| | | let _searchlist = fromJS(this.state.searchlist).toJS().map(item => { |
| | | if (['select', 'link', 'multiselect', 'checkcard', 'radio'].includes(item.type) && result[item.field] && result[item.field].length > 0) { |
| | | let options = [] |
| | |
| | | item.options = item.oriOptions |
| | | } |
| | | |
| | | if (item.$first && item.options.length > 0) { |
| | | item.initval = item.options[0].Value |
| | | trigger = true |
| | | } |
| | | |
| | | return item |
| | | }) |
| | | |
| | | this.setState({ |
| | | searchlist: _searchlist |
| | | }) |
| | | |
| | | if (trigger) { |
| | | setTimeout(() => { |
| | | this.handleSubmit() |
| | | }, 10) |
| | | } |
| | | } |
| | | |
| | | recordChange = (val, defer, item) => { |