Skip to content

Commit c068e63

Browse files
authored
Merge pull request #11 from Sanketika-Obsrv/main
1.2.0-RC fixes
2 parents 0481a08 + 6b75825 commit c068e63

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

web-console-v2/src/pages/StepsPages/Ingestion/Ingestion.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff 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-z0-9\s]+/g, '-').replace(/\s+/g, '-'))
434431
}
435432
setNameError('');
436433
} else {

0 commit comments

Comments
 (0)