Open undead25 opened 7 years ago
Do you want to request a feature or report a bug (建议还是bug) ?
What is the current behavior? (现有状况)
What is the expected behavior? (应有状况)
Which versions of React-weui, weui, and which OS and device are affected by this issue? (React-weui版本 weui版本 机型和系统)
重现
[数据不一致。]
代码对应位置
updateGroup(item, i, groupIndex, selected, picker) { const { data, dataMap } = this.props; //validate if item exists const { groups, newselected } = this.parseData(data, dataMap.items, selected); let text = ''; try { groups.forEach((group, _i) => { text += `${group['items'][selected[_i]][this.props.dataMap.id]} `; }); } catch (err) { //wait text = this.state.text; } //console.log(groups) this.setState({ groups, text, selected: newselected }); //update picker picker.setState({ selected: newselected }); }
建议 将value的赋值放在setState的回调里面
Do you want to request a feature or report a bug (建议还是bug) ?
What is the current behavior? (现有状况)
What is the expected behavior? (应有状况)
Which versions of React-weui, weui, and which OS and device are affected by this issue? (React-weui版本 weui版本 机型和系统)
重现
[数据不一致。]
代码对应位置
建议 将value的赋值放在setState的回调里面