Enter key handling for dialogs.

This commit is contained in:
Robin Davies
2024-10-08 04:20:37 -04:00
parent ebe56f4df9
commit a8061a6d15
31 changed files with 131 additions and 49 deletions
+5 -1
View File
@@ -25,6 +25,7 @@ import Dialog, {DialogProps} from '@mui/material/Dialog';
interface DialogExProps extends DialogProps {
tag: string;
fullwidth?: boolean;
onEnterKey: () => void;
}
interface DialogExState {
@@ -186,7 +187,10 @@ class DialogEx extends React.Component<DialogExProps,DialogExState> implements I
}
onEnterKey() {
if (this.props.onEnterKey)
{
this.props.onEnterKey();
}
}
onKeyDown(evt: React.KeyboardEvent<HTMLDivElement>)
{