[Update/bugfix] Config Page: Transcription: Change the input design entry to dropdowns. It will fix the bug that cant put e.g. the user wanna put "10" actually, then, type "1" at first, but validation says "1" is not allowed.
This commit is contained in:
@@ -49,4 +49,12 @@ export const updateLabelsById = (data_array, updates) => {
|
||||
const update = updates.find(update_item => update_item.id === item.id);
|
||||
return update ? { ...item, label: update.label } : item;
|
||||
});
|
||||
};
|
||||
|
||||
export const genNumArray = (count, start_from = 0) => {
|
||||
return [...Array(count).keys()].map(i => i + start_from);
|
||||
};
|
||||
|
||||
export const genNumObjArray = (count, start_from = 0) => {
|
||||
return arrayToObject(genNumArray(count, start_from));
|
||||
};
|
||||
Reference in New Issue
Block a user