Open
Description
I have found an issue.
When adding new Groups, their IDs are generated using this function.
const ALPHABET = "Uint8ArdomValuesObj012345679BCDEFGHIJKLMNPQRSTWXYZ_cfghkpqvwxyz";
export default function uniqueId() {
return "cf-${generate(ALPHABET, 21)}";
}
As we can see, the string uses the character '_'.
There is a small probability that this character will appear twice (but the probability exists, and it has happened to me three times in one day, you could say I won the lottery).
What’s the problem, you ask? The problem is that in this function:
handleGroupFieldChange = (fieldId, fieldValue) => {
const {
id,
value,
onChange
} = this.props;
onChange(id, produce(value, (draft) => {
const path = fieldId.split('__');
const fieldName = path.pop();
const group = find(draft, ['_id', path.pop()]);
set(group, fieldName, fieldValue);
}));
}
the string is split using '__', and in my case, these fields are not being saved. Therefore, please remove the '_' from the ID generation string in one of the upcoming updates!
Metadata
Metadata
Assignees
Labels
No labels