fix(style): tooltip scroll bar color, auto input trim spaces
This commit is contained in:
@@ -13,6 +13,7 @@ const SealAutoComplete: React.FC<
|
|||||||
required,
|
required,
|
||||||
description,
|
description,
|
||||||
isInFormItems = true,
|
isInFormItems = true,
|
||||||
|
trim = true,
|
||||||
onSelect,
|
onSelect,
|
||||||
extra,
|
extra,
|
||||||
style,
|
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);
|
props.onChange?.(value, option);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -54,6 +59,7 @@ const SealAutoComplete: React.FC<
|
|||||||
if (!props.value) {
|
if (!props.value) {
|
||||||
setIsFocus(false);
|
setIsFocus(false);
|
||||||
}
|
}
|
||||||
|
e.target.value = e.target.value?.trim?.();
|
||||||
props.onBlur?.(e);
|
props.onBlur?.(e);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -45,3 +45,10 @@
|
|||||||
color: var(--color-progress-green);
|
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>
|
</div>
|
||||||
|
|
||||||
<SimpleBar style={{ maxHeight: 200 }} autoHide={false}>
|
<SimpleBar
|
||||||
|
style={{ maxHeight: 200 }}
|
||||||
|
autoHide={false}
|
||||||
|
className="tooltip-scrollbar"
|
||||||
|
>
|
||||||
<div
|
<div
|
||||||
style={{
|
style={{
|
||||||
width: 'max-content',
|
width: 'max-content',
|
||||||
|
|||||||
Reference in New Issue
Block a user