如何使用ReactJ选择下拉树选择选定的项目?
实际上,我正在使用React下拉树选择所有内容都很好,但是问题是,当我选择一个项目时,我无法获得他的价值是Select Box。它消失了。我想在选择它后继续进行分配。 这是JSX代码:
<Row>
<DropdownTreeSelect data={unitList}
id='unit_id'
mode='radioSelect'
onChange={onChange}
className="mdl-demo"
/>
</Row>
事先感谢您的帮助
actually I'm using react dropdown tree select everything is working good but the problem is that when I select an item I can't get his value is the select box. it disappears. I want to keep dispalying after choosing it.
this is JSX code :
<Row>
<DropdownTreeSelect data={unitList}
id='unit_id'
mode='radioSelect'
onChange={onChange}
className="mdl-demo"
/>
</Row>
Thanks in advance for your help
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要相应地将单位列表更新为下拉中选定的项目。每个数据节点中都有“检查”道具,您需要将其保持最新。
you need to update unitList accordingly to selected item in dropdown. There is 'checked' prop in each data node, and you need to keep it up to date.