Antd updates (#2194)
* Fix antd Modal.visible warning by using updated attribute name 'open'. * Update more attributes (onVisibleChange => onOpenChange, defaultVisible => defaultOpen) to fix browser console warnings. * Update ModalProps property from 'visible' to 'open' to match the change in antd. * Update variable names to match the antd change from 'visible' to 'open'. * Inline this for the linter. * One more visible => open reference.
This commit is contained in:
@@ -5,7 +5,7 @@ import styles from './Modal.module.scss';
|
||||
export type ModalProps = {
|
||||
title: string;
|
||||
url?: string;
|
||||
visible: boolean;
|
||||
open: boolean;
|
||||
handleOk?: () => void;
|
||||
handleCancel?: () => void;
|
||||
afterClose?: () => void;
|
||||
@@ -17,7 +17,7 @@ export type ModalProps = {
|
||||
export const Modal: FC<ModalProps> = ({
|
||||
title,
|
||||
url,
|
||||
visible,
|
||||
open,
|
||||
handleOk,
|
||||
handleCancel,
|
||||
afterClose,
|
||||
@@ -51,7 +51,7 @@ export const Modal: FC<ModalProps> = ({
|
||||
return (
|
||||
<AntModal
|
||||
title={title}
|
||||
visible={visible}
|
||||
open={open}
|
||||
onOk={handleOk}
|
||||
onCancel={handleCancel}
|
||||
afterClose={afterClose}
|
||||
|
||||
Reference in New Issue
Block a user