fix(style): tooltip scroll bar color, auto input trim spaces
This commit is contained in:
@@ -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);
|
||||
};
|
||||
|
||||
|
||||
@@ -45,3 +45,10 @@
|
||||
color: var(--color-progress-green);
|
||||
}
|
||||
}
|
||||
|
||||
.tooltip-scrollbar {
|
||||
.simplebar-scrollbar::before {
|
||||
width: var(--scrollbar-size);
|
||||
background: var(--scrollbar-handle-light-bg);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,7 +118,11 @@ const StatusTag: React.FC<StatusTagProps> = ({
|
||||
})}
|
||||
</div>
|
||||
|
||||
<SimpleBar style={{ maxHeight: 200 }} autoHide={false}>
|
||||
<SimpleBar
|
||||
style={{ maxHeight: 200 }}
|
||||
autoHide={false}
|
||||
className="tooltip-scrollbar"
|
||||
>
|
||||
<div
|
||||
style={{
|
||||
width: 'max-content',
|
||||
|
||||
Reference in New Issue
Block a user