Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tabs] 使用 list 传 props 且 destroyOnHide 为 false 下, 会丢失 panel 内容 #2497

Closed
lzy2014love opened this issue Sep 6, 2023 · 2 comments
Assignees
Labels
🐞 bug Something isn't working to be published fixed, not be published

Comments

@lzy2014love
Copy link
Contributor

重现链接

https://stackblitz.com/edit/react-wwqm8z?file=src%2Fdemo.jsx

重现步骤

  const list = [
    {
      label: '选项卡一',
      value: 1,
      destroyOnHide: false,
      panel: <div>选项卡一</div>,
    },
    {
      label: '选项卡二',
      value: 2,
      destroyOnHide: false,
      panel: <div>选项卡二</div>,
    },
  ];

      <Tabs
        placement={'top'}
        defaultValue={1}
        size={'medium'}
        disabled={false}
        list={list}
      ></Tabs>

期望结果

不会丢失 panel 内容

实际结果

会丢失 panel 内容
image

Environment Info
相关版本 1.2.4
框架版本 / 基础库版本 React(17.0.2)
系统、浏览器 MacOS(11.2.3)、Chrome(8.213.231.123)
Node版本
@github-actions
Copy link
Contributor

github-actions bot commented Sep 6, 2023

👋 @lzy2014love,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@github-actions
Copy link
Contributor

github-actions bot commented Sep 6, 2023

♥️ 有劳 @cuijinyu @kenzyyang @insekkei 尽快确认问题。
确认有效后将下一步计划和可能需要的时间回复给 @lzy2014love

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working to be published fixed, not be published
Projects
None yet
Development

No branches or pull requests

3 participants