File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 58
58
"classnames" : " ^2.2.6" ,
59
59
"prop-types" : " 15.x" ,
60
60
"raf" : " ^3.4.1" ,
61
- "rc-align" : " ^3.0.0-alpha.3 " ,
61
+ "rc-align" : " ^3.0.0-rc.0 " ,
62
62
"rc-animate" : " ^2.10.2" ,
63
63
"rc-util" : " ^4.15.2"
64
64
}
Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ interface PopupProps {
59
59
point ?: Point ;
60
60
zIndex ?: number ;
61
61
mask ?: boolean ;
62
+ keepAlign ?: boolean ;
62
63
63
64
// Motion
64
65
motion : MotionType ;
@@ -249,6 +250,7 @@ class Popup extends Component<PopupProps, PopupState> {
249
250
prefixCls,
250
251
className,
251
252
style,
253
+ keepAlign,
252
254
stretch,
253
255
visible,
254
256
align,
@@ -332,6 +334,7 @@ class Popup extends Component<PopupProps, PopupState> {
332
334
disabled = { mergedAlignDisabled }
333
335
align = { align }
334
336
onAlign = { this . onAlign }
337
+ keepAlign = { keepAlign }
335
338
>
336
339
< PopupInner
337
340
prefixCls = { prefixCls }
Original file line number Diff line number Diff line change @@ -75,6 +75,8 @@ export interface TriggerProps {
75
75
76
76
stretch ?: string ;
77
77
alignPoint ?: boolean ; // Maybe we can support user pass position in the future
78
+ /** Align will repeat trigger when component did updated */
79
+ keepAlign ?: boolean ;
78
80
79
81
/** Set popup motion. You can ref `rc-animate` for more info. */
80
82
popupMotion ?: MotionType ;
@@ -458,6 +460,7 @@ export function generateTrigger(PortalComponent: any): React.ComponentClass<Trig
458
460
popup,
459
461
stretch,
460
462
alignPoint,
463
+ keepAlign,
461
464
} = this . props ;
462
465
const { popupVisible, point } = this . state ;
463
466
@@ -497,6 +500,7 @@ export function generateTrigger(PortalComponent: any): React.ComponentClass<Trig
497
500
maskMotion = { maskMotion }
498
501
ref = { this . popupRef }
499
502
motion = { popupMotion }
503
+ keepAlign = { keepAlign }
500
504
>
501
505
{ typeof popup === 'function' ? popup ( ) : popup }
502
506
</ Popup >
You can’t perform that action at this time.
0 commit comments