File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
web-console-v2/src/pages/StepsPages/Ingestion Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -323,6 +323,7 @@ const Ingestion = () => {
323323 ( fetchData && fetchData . dataset_config ?. indexing_config ) || { } ,
324324 file_upload_path : filePaths
325325 } ,
326+ name : datasetName ,
326327 data_schema : schema ,
327328 dataset_id : datasetId ,
328329 type : datasetType ,
@@ -422,15 +423,11 @@ const Ingestion = () => {
422423
423424 const nameRegex = / ^ [ ^ ! @ # $ % ^ & * ( ) + { } [ \] : ; < > , ? ~ \\ | ] * $ / ;
424425 const handleNameChange = ( newValue : any , isBlur = false ) => {
425- if ( isBlur && newValue ) {
426- setIsDatasetExistChecking ( true ) ;
427- debouncedFetchDataset ( newValue )
428- }
429426 if ( nameRegex . test ( newValue ) ) {
430427 setDatasetName ( newValue ) ;
431- if ( datasetIdParam === '<new>' ) {
432- const generatedId = datasetName . toLowerCase ( ) . replace ( / \s + / g , '-' ) ;
433- setDatasetId ( generatedId ) ;
428+ if ( datasetIdParam === '<new>' && isBlur ) {
429+ setIsDatasetExistChecking ( true ) ;
430+ debouncedFetchDataset ( newValue . toLowerCase ( ) . replace ( / [ ^ a - z 0 - 9 \s ] + / g , '-' ) . replace ( / \s + / g , '-' ) )
434431 }
435432 setNameError ( '' ) ;
436433 } else {
You can’t perform that action at this time.
0 commit comments