File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import {
23
23
24
24
interface Props extends React . HTMLAttributes < HTMLDivElement > {
25
25
vertical ?: boolean ;
26
+ onActivate ?: ( ) => void ;
26
27
beforeApplyResizer ?: ( resizer : Resizer ) => void ;
27
28
afterResizing ?: ( ) => void ;
28
29
}
@@ -122,11 +123,19 @@ class Container extends React.PureComponent<Props> {
122
123
}
123
124
124
125
private monitorBarStatusChanges ( { type } : BarActionScanResult ) {
125
- if (
126
- type === BarActionType . DEACTIVATE &&
127
- typeof this . props . afterResizing === 'function'
128
- ) {
129
- this . props . afterResizing ( ) ;
126
+ switch ( type ) {
127
+ case BarActionType . ACTIVATE :
128
+ if ( typeof this . props . onActivate === 'function' ) {
129
+ this . props . onActivate ( ) ;
130
+ }
131
+ return ;
132
+ case BarActionType . DEACTIVATE :
133
+ if ( typeof this . props . afterResizing === 'function' ) {
134
+ this . props . afterResizing ( ) ;
135
+ }
136
+ return ;
137
+ default :
138
+ return ;
130
139
}
131
140
}
132
141
You can’t perform that action at this time.
0 commit comments