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

Popup 组件内部嵌套 Radio 组件,关闭动画异常 #1154

Closed
LentoYe opened this issue Nov 10, 2023 · 0 comments · Fixed by #1153
Closed

Popup 组件内部嵌套 Radio 组件,关闭动画异常 #1154

LentoYe opened this issue Nov 10, 2023 · 0 comments · Fixed by #1153

Comments

@LentoYe
Copy link
Contributor

LentoYe commented Nov 10, 2023

Description

Popup 组件内部嵌套 Radio 组件,Radio 组件可以控制Popup 的关闭,然而 Radio 的onChange 事件绑定控制Popup 关闭的方法后,Popup 关闭的动画消失,形成闪退的效果。

Steps to Reproduce

const [popupVisible, setPopupVisible] = false;

<Popup animationDuration={500} visible={popupVisible} onMaskClick={() => setPopupVisible(false)} destroy={false}>
  <NavBar right={<Close theme="primary" onClick={() => setPopupVisible(false)} />} />  // 关闭动画正常
  <Radio.Group 
    type="list" 
    listIconAlign="after" 
    value={paymentChosen.paymentWay} 
    onChange={() => setPopupVisible(false)}  // 关闭动画异常
  >
    {
      paymentList.map((item) => {
        return <Radio data={item} />;
      })
    }
  </Radio.Group>
</Popup>

Environment

  • zarm version 3.0.13
  • react version 17.0.2
  • system version MacOS 14.1
  • browser version Chrome

You can get this information from package.json and your device.

@dominicleo dominicleo linked a pull request Nov 13, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants