Node.js 中的选项卡未显示适当的内容
我正在使用semantic ui react中的Node.js 中的选项卡未显示适当的内容,node.js,reactjs,redux,semantic-ui,Node.js,Reactjs,Redux,Semantic Ui,我正在使用semantic ui react中的选项卡。我需要显示一个日期列表以及当天的相应事件。然而,一天中创建的事件在另一天也会出现 如图所示,我在第1天创建了一个事件,但它在第2天显示,这是不正确的。以下是我如何生成选项卡数据: const panes = selectedDays.map((day, index) => { const count = index + 1; return { menuItem: `Day ${count}`, render
选项卡。我需要显示一个日期列表以及当天的相应事件。然而,一天中创建的事件在另一天也会出现
如图所示,我在第1天创建了一个事件,但它在第2天显示,这是不正确的。以下是我如何生成选项卡数据:
const panes = selectedDays.map((day, index) => {
const count = index + 1;
return {
menuItem: `Day ${count}`,
render: () => <Tab.Pane><Agenda day={day} index={count} /></Tab.Pane>
};
});
this.setState({ panes });
const panes=selectedDays.map((天,索引)=>{
常数计数=索引+1;
返回{
menuItem:`Day${count}`,
渲染:()=>
};
});
this.setState({panes});
组件代码
{
currentIndex === 3 &&
<Fragment>
<Tab
menu={{ pointing: true }}
panes={this.state.panes}
/>
<Button className='formnext' onClick={this.handlePrevious}>
<FontAwesome name='angle-left' style={{ color: 'white', fontSize: '2.2rem' }} className='logout' />
</Button>
<Button className='formnext' onClick={this.handleNext}>
<FontAwesome name='angle-right' style={{ color: 'white', fontSize: '2.2rem' }} className='logout' />
</Button>
</Fragment>
}
{
currentIndex==3&&
}
如果我在选项卡窗格
或议程
组件中添加键
属性,单击选项卡标题,只会清除我的状态,我将没有数据。你知道如何解决这个问题吗?你能告诉我你为什么把渲染作为关键吗?您可以尝试更改它吗?请添加您正在使用它的整个组件,以便任何人都能理解该案例场景。@SuryaPurohit我将render
作为一个键,因为。更新了问题,将组件代码也包括在内。