fix(prejoin) improve display name handling relative to configs (#13865)

This commit is contained in:
Mihaela Dumitru
2023-09-29 16:17:35 +03:00
committed by GitHub
parent 7bf3e7df1d
commit b546d01c2d
12 changed files with 167 additions and 40 deletions

View File

@@ -136,6 +136,7 @@ export interface IProps {
description?: string;
disableBackdropClose?: boolean;
disableEnter?: boolean;
disableEscape?: boolean;
onClose?: () => void;
size?: 'large' | 'medium';
submit?: () => void;
@@ -150,6 +151,7 @@ const BaseDialog = ({
description,
disableBackdropClose,
disableEnter,
disableEscape,
onClose,
size = 'medium',
submit,
@@ -166,7 +168,7 @@ const BaseDialog = ({
}, [ disableBackdropClose, onClose ]);
const handleKeyDown = useCallback((e: KeyboardEvent) => {
if (e.key === 'Escape') {
if (e.key === 'Escape' && !disableEscape) {
onClose?.();
}
if (e.key === 'Enter' && !disableEnter) {