mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 03:58:07 +08:00
fix:修复时间类组件事件派发
This commit is contained in:
parent
87a8a05e17
commit
3c895614c7
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user