fix(style): tooltip scroll bar color, auto input trim spaces

This commit is contained in:
jialin
2025-01-22 16:32:46 +08:00
parent b3beae44df
commit 61fb7b0d86
3 changed files with 19 additions and 2 deletions
+7 -1
View File
@@ -13,6 +13,7 @@ const SealAutoComplete: React.FC<
required,
description,
isInFormItems = true,
trim = true,
onSelect,
extra,
style,
@@ -41,7 +42,11 @@ const SealAutoComplete: React.FC<
}
};
const handleChange = (value: string, option: any) => {
const handleChange = (val: string, option: any) => {
let value = val;
if (trim) {
value = value?.trim?.();
}
props.onChange?.(value, option);
};
@@ -54,6 +59,7 @@ const SealAutoComplete: React.FC<
if (!props.value) {
setIsFocus(false);
}
e.target.value = e.target.value?.trim?.();
props.onBlur?.(e);
};