Rework to level up once at a time

This commit is contained in:
WBHarry 2025-06-06 02:33:38 +02:00
parent 37b8c9bd37
commit 43444dfd42
16 changed files with 653 additions and 739 deletions

View file

@ -205,3 +205,21 @@ export const tagifyElement = (element, options, onChange, tagifyOptions = {}) =>
};
tagifyElement.on('change', onSelect);
};
export const getDeleteKeys = (property, innerProperty, innerPropertyDefaultValue) => {
return Object.keys(property).reduce((acc, key) => {
if (innerProperty) {
if (innerPropertyDefaultValue !== undefined) {
acc[`${key}`] = {
[innerProperty]: innerPropertyDefaultValue
};
} else {
acc[`${key}.-=${innerProperty}`] = null;
}
} else {
acc[`-=${key}`] = null;
}
return acc;
}, {});
};