Open kaiyoma opened 7 months ago
Same proplem, when the react component is destroyed, a warning will be reported in multiple mode.
version: antd5.14.0;
"rc-select": "^14.11.0",
import { Button } from "antd";
import { useState } from "react";
import PageA from "@/pages/PageA";
import PageB from "@/pages/PageB";
function Home() {
const [isShow, setShow] = useState(true);
return <div>
{isShow ? <PageA/> : <PageB/>}
<Button onClick={() => {
setShow(!isShow);
}}>Play</Button>
</div>
}
export default Home;
PageA.jsx
import React from "react";
import Select, { Option } from 'rc-select';
import 'rc-select/assets/index.css';
function PageA(){
return <div>
<Select mode={'multiple'}>
<Option value="jack">jack</Option>
<Option value="lucy">lucy</Option>
<Option value="yiminghe">123</Option>
</Select>
</div>
}
export default PageA;
Same error with Antd@4.24.0
We use Ant Design 4.x (which uses this library under the hood) and if we try to click an Ant dropdown inside a unit test, we always get this error:
Glancing at the other open issues, it seems similar to #23.