1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-11-29 10:24:20 +01:00

(bug) category slug with special characters

This commit is contained in:
Sylvain 2022-10-04 10:32:16 +02:00
parent 4cfb1a1253
commit f3a2136e7d

View File

@ -54,7 +54,7 @@ export const ProductCategoryForm: React.FC<ProductCategoryFormProps> = ({ action
useEffect(() => {
const subscription = watch((value, { name }) => {
if (name === 'name') {
const _slug = slugify(value.name, { lower: true });
const _slug = slugify(value.name, { lower: true, strict: true });
setValue('slug', _slug);
}
});