mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-22 06:26:00 +00:00
submit action - run with enter
This commit is contained in:
@@ -12,10 +12,19 @@ export default function ChangeDownloadUrlModal({ modalState, url = '', onConfirm
|
||||
// React.useEffect(() => {
|
||||
// if (textFieldRef.current) textFieldRef.current.focus();
|
||||
// }, [textFieldRef.current]);
|
||||
const handleSubmit = async (values) => {
|
||||
onConfirm(values.url);
|
||||
modalState.close();
|
||||
};
|
||||
|
||||
// const handleSubmit = () => async (values) => {
|
||||
// onConfirm(values.url);
|
||||
// modalState.close();
|
||||
// };
|
||||
|
||||
const handleSubmit = React.useCallback(
|
||||
async (values) => {
|
||||
onConfirm(values.url);
|
||||
modalState.close();
|
||||
},
|
||||
[modalState, onConfirm]
|
||||
);
|
||||
return (
|
||||
<ModalBase modalState={modalState}>
|
||||
<ModalHeader modalState={modalState}>Download imported file from web</ModalHeader>
|
||||
|
||||
Reference in New Issue
Block a user