fix(mini): preserve child name input during pinyin composition
This commit is contained in:
@@ -20,7 +20,6 @@ import {
|
||||
CHILD_NAME_RULE_MESSAGE,
|
||||
createChild,
|
||||
getChildren,
|
||||
sanitizeChildNameInput,
|
||||
resolveChildSelection,
|
||||
setSelectedChildId as setStoredSelectedChildId,
|
||||
validateChildNameInput,
|
||||
@@ -804,9 +803,10 @@ export default function Bind() {
|
||||
? children.length > 0 ? '不选已有宝贝时,可填写2-5位简体中文姓名(暂不支持数字和英文)' : CHILD_NAME_RULE_MESSAGE
|
||||
: children.length > 0 ? '不选已有宝贝时,可填写2-5位简体中文姓名(暂不支持数字和英文)' : '可不填,稍后再关联宝贝'
|
||||
}
|
||||
maxlength={5}
|
||||
maxlength={-1}
|
||||
onInput={(event) => {
|
||||
const nextChildName = sanitizeChildNameInput(event.detail.value)
|
||||
// Preserve pinyin composition; validate the final name on submit.
|
||||
const nextChildName = event.detail.value
|
||||
setNewChildName(nextChildName)
|
||||
if (nextChildName) {
|
||||
setSelectedChildId(null)
|
||||
|
||||
Reference in New Issue
Block a user