fix:修复时间类组件事件派发

This commit is contained in:
sqzhou 2022-04-29 17:40:01 +08:00
parent 87a8a05e17
commit 3c895614c7
2 changed files with 2 additions and 2 deletions

View File

@ -445,7 +445,7 @@ export default class DateControl extends React.PureComponent<
@autobind
async handleChange(nextValue: any) {
const {dispatchEvent, data} = this.props;
const dispatcher = dispatchEvent('change', createObject(data, nextValue));
const dispatcher = dispatchEvent('change', createObject(data, {value: nextValue}));
if (dispatcher?.prevented) {
return;
}

View File

@ -216,7 +216,7 @@ export default class DateRangeControl extends React.Component<DateRangeProps> {
@autobind
async handleChange(nextValue: any) {
const {dispatchEvent, data} = this.props;
const dispatcher = dispatchEvent('change', createObject(data, nextValue));
const dispatcher = dispatchEvent('change', createObject(data, {value: nextValue}));
if (dispatcher?.prevented) {
return;
}