77 */
88import { observer } from 'mobx-react-lite' ;
99
10- import { Form , InputField , Translate , useFocus , useForm } from '@cloudbeaver/core-blocks' ;
10+ import { InputField , Translate , useForm } from '@cloudbeaver/core-blocks' ;
1111import { type IScriptExportTabProps } from '@cloudbeaver/plugin-script-export' ;
1212import type { TabContainerPanelComponent } from '@cloudbeaver/core-ui' ;
1313import { downloadSql } from '../downloadSql.js' ;
@@ -20,12 +20,11 @@ export const LocalExportPanel: TabContainerPanelComponent<IScriptExportTabProps>
2020 script,
2121 fileName : initialFileName ,
2222} ) {
23- const [ focusedRef ] = useFocus < HTMLFormElement > ( { focusFirstChild : true } ) ;
2423 const notificationService = useService ( NotificationService ) ;
2524 const [ fileName , setFileName ] = useState ( initialFileName ) ;
2625
27- const form = useForm ( {
28- onSubmit ( event ) {
26+ useForm ( {
27+ onSubmit ( ) {
2928 const fileNameWithTimestamp = withTimestamp ( fileName ) ;
3029 downloadSql ( fileNameWithTimestamp , script ) ;
3130 notificationService . logSuccess ( {
@@ -36,10 +35,8 @@ export const LocalExportPanel: TabContainerPanelComponent<IScriptExportTabProps>
3635 } ) ;
3736
3837 return (
39- < Form ref = { focusedRef } context = { form } >
40- < InputField name = "fileName" value = { fileName } required small onChange = { setFileName } >
41- < Translate token = "ui_file_name" />
42- </ InputField >
43- </ Form >
38+ < InputField name = "fileName" value = { fileName } required small onChange = { setFileName } >
39+ < Translate token = "ui_file_name" />
40+ </ InputField >
4441 ) ;
4542} ) ;
0 commit comments