Skip to content

Commit a334ef8

Browse files
Update Drawer.js
1 parent 879d09c commit a334ef8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/Drawer.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ export default class Drawer extends Component {
3232
headerHeight: PropTypes.number,
3333
// Height of the visible teaser area at the bottom of the screen
3434
teaserHeight: PropTypes.number,
35+
onClose: PropTypes.func,
3536
};
3637

3738
// Set default prop values
@@ -40,6 +41,7 @@ export default class Drawer extends Component {
4041
header: 'Messages',
4142
headerHeight: 70,
4243
teaserHeight: 75,
44+
onClose:()=>{}
4345
};
4446

4547
// Define state
@@ -308,6 +310,7 @@ export default class Drawer extends Component {
308310

309311
// Minimize window and keep a teaser at the bottom
310312
close = () => {
313+
this.props.onClose();
311314
this._scrollView.scrollTo({ y: 0 });
312315
Animated.timing(this._animatedPosition, {
313316
toValue: this.config.position.start,

0 commit comments

Comments
 (0)