mirror of
https://github.com/certimate-go/certimate.git
synced 2026-07-20 21:01:41 +08:00
fix(ui): fix the issue of unable to close CertificateDownloadModal
This commit is contained in:
parent
2891447776
commit
4584dafcee
@ -31,8 +31,11 @@ const CertificateDownloadModal = ({ afterClose, data, trigger, ...props }: Certi
|
||||
});
|
||||
const setOpen = (open: boolean) => {
|
||||
_setOpen(open);
|
||||
setTableExpandedKeys([]);
|
||||
formInst.resetFields();
|
||||
|
||||
if (!open) {
|
||||
setTableExpandedKeys([]);
|
||||
formInst.resetFields();
|
||||
}
|
||||
};
|
||||
|
||||
const triggerEl = useTriggerElement(trigger, { onClick: () => setOpen(true) });
|
||||
@ -145,7 +148,9 @@ const CertificateDownloadModal = ({ afterClose, data, trigger, ...props }: Certi
|
||||
];
|
||||
const [tableExpandedKeys, setTableExpandedKeys] = useState<string[]>([]);
|
||||
|
||||
const handleCancelClick = () => {};
|
||||
const handleCancelClick = () => {
|
||||
setOpen(false);
|
||||
};
|
||||
|
||||
const handleDownloadClick = async (format: CertificateFormatType) => {
|
||||
await formInst.validateFields();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user