Skip to content

Commit 85e3933

Browse files
committed
fix: Picker should open when click on padding
fix ant-design/ant-design#21149
1 parent ae16e30 commit 85e3933

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/Picker.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,7 @@ function InnerPicker<DateType>(props: PickerProps<DateType>) {
289289

290290
if (inputRef.current) {
291291
inputRef.current.focus();
292+
triggerOpen(true);
292293
}
293294
};
294295

tests/picker.spec.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -557,6 +557,7 @@ describe('Picker.Basic', () => {
557557

558558
wrapper.find('.rc-picker').simulate('mouseUp');
559559
expect(inputElement.focus).toHaveBeenCalled();
560+
expect(wrapper.isOpen()).toBeTruthy();
560561
});
561562

562563
it('defaultOpenValue in timePicker', () => {

0 commit comments

Comments
 (0)