fix: InputBox 当 ui 库用时 onClear 处理错误 (#2854)

This commit is contained in:
liaoxuezhi 2021-11-05 12:37:31 +08:00 committed by GitHub
parent 4473fcab3b
commit 8693ea3bd4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,7 +37,7 @@ export class InputBox extends React.Component<InputBoxProps, InputBoxState> {
clearValue(e: any) { clearValue(e: any) {
e.preventDefault(); e.preventDefault();
const onClear = this.props.onChange; const onClear = this.props.onClear;
const onChange = this.props.onChange; const onChange = this.props.onChange;
onClear?.(e); onClear?.(e);
onChange?.(''); onChange?.('');