File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -186,6 +186,7 @@ function InnerPicker<DateType>(props: PickerProps<DateType>) {
186186 // Panel ref
187187 const panelDivRef = React . useRef < HTMLDivElement > ( null ) ;
188188 const inputDivRef = React . useRef < HTMLDivElement > ( null ) ;
189+ const containerRef = React . useRef < HTMLDivElement > ( null ) ;
189190
190191 // Real value
191192 const [ mergedValue , setInnerValue ] = useMergedState ( null , {
@@ -294,7 +295,10 @@ function InnerPicker<DateType>(props: PickerProps<DateType>) {
294295 triggerOpen,
295296 forwardKeyDown,
296297 isClickOutside : ( target ) =>
297- ! elementsContains ( [ panelDivRef . current , inputDivRef . current ] , target as HTMLElement ) ,
298+ ! elementsContains (
299+ [ panelDivRef . current , inputDivRef . current , containerRef . current ] ,
300+ target as HTMLElement ,
301+ ) ,
298302 onSubmit : ( ) => {
299303 if ( disabledDate && disabledDate ( selectedValue ) ) {
300304 return false ;
@@ -486,6 +490,7 @@ function InnerPicker<DateType>(props: PickerProps<DateType>) {
486490 direction = { direction }
487491 >
488492 < div
493+ ref = { containerRef }
489494 className = { classNames ( prefixCls , className , {
490495 [ `${ prefixCls } -disabled` ] : disabled ,
491496 [ `${ prefixCls } -focused` ] : focused ,
You can’t perform that action at this time.
0 commit comments