mirror of
https://github.com/ant-design/ant-design.git
synced 2024-11-24 19:19:57 +08:00
fix #12475. Picker should get focus after selection.
This commit is contained in:
parent
50b55f488e
commit
e5cfef565b
@ -140,6 +140,7 @@ class RangePicker extends React.Component<any, RangePickerState> {
|
||||
formatValue(value[0], props.format),
|
||||
formatValue(value[1], props.format),
|
||||
]);
|
||||
this.focus();
|
||||
}
|
||||
|
||||
handleOpenChange = (open: boolean) => {
|
||||
|
@ -64,6 +64,7 @@ class WeekPicker extends React.Component<any, any> {
|
||||
this.setState({ value });
|
||||
}
|
||||
this.props.onChange(value, formatValue(value, this.props.format));
|
||||
this.focus();
|
||||
}
|
||||
clearSelection = (e: React.MouseEvent<HTMLElement>) => {
|
||||
e.preventDefault();
|
||||
|
@ -80,6 +80,7 @@ export default function createPicker(TheCalendar: React.ComponentClass): any {
|
||||
});
|
||||
}
|
||||
props.onChange(value, (value && value.format(props.format)) || '');
|
||||
this.focus();
|
||||
}
|
||||
|
||||
handleCalendarChange = (value: moment.Moment) => {
|
||||
|
Loading…
Reference in New Issue
Block a user