[#7532] pause collection and fields name normalization while in IME mode

This commit is contained in:
Gani Georgiev
2026-02-17 17:29:38 +02:00
parent 3b9f2141fe
commit f6675702ea
32 changed files with 109 additions and 102 deletions

View File

@@ -456,6 +456,10 @@
placeholder={isAuth ? `eg. "users"` : `eg. "posts"`}
value={collection.name}
on:input={(e) => {
if (e.isComposing) {
return
}
collection.name = CommonHelper.slugify(e.target.value);
e.target.value = collection.name;
}}

View File

@@ -84,10 +84,6 @@
}
}
function normalizeFieldName(name) {
return CommonHelper.slugify(name);
}
function expand() {
showOptions = true;
collapseSiblings();
@@ -177,12 +173,14 @@
spellcheck="false"
placeholder="Field name"
value={field.name}
title="System field"
on:input={(e) => {
const oldName = field.name;
field.name = normalizeFieldName(e.target.value);
e.target.value = field.name;
if (e.isComposing) {
return
}
const oldName = field.name;
field.name = CommonHelper.slugify(e.target.value);
e.target.value = field.name;
dispatch("rename", { oldName: oldName, newName: field.name });
}}
/>