如何使用ReactJ选择下拉树选择选定的项目?

发布于 2025-02-05 03:56:53 字数 397 浏览 3 评论 0原文

实际上,我正在使用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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

我乃一代侩神 2025-02-12 03:56:53

您需要相应地将单位列表更新为下拉中选定的项目。每个数据节点中都有“检查”道具,您需要将其保持最新。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文