File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -557,8 +557,15 @@ function InnerRangePicker<DateType>(props: RangePickerProps<DateType>) {
557557 } ;
558558
559559 // ============================= Input =============================
560+ // We call effect to update `delayOpen` here since
561+ // when popup closed and input focused, should not trigger change when click another input
562+ const [ delayOpen , setDelayOpen ] = React . useState ( mergedOpen ) ;
563+ React . useEffect ( ( ) => {
564+ setDelayOpen ( mergedOpen ) ;
565+ } , [ mergedOpen ] ) ;
566+
560567 const onInternalBlur : React . FocusEventHandler < HTMLInputElement > = ( e ) => {
561- if ( changeOnBlur && mergedOpen ) {
568+ if ( changeOnBlur && delayOpen ) {
562569 const selectedIndexValue = getValue ( selectedValue , mergedActivePickerIndex ) ;
563570 if ( selectedIndexValue ) {
564571 triggerChange ( selectedValue , mergedActivePickerIndex ) ;
You can’t perform that action at this time.
0 commit comments