Skip to content

Commit 8948e3a

Browse files
M-i-k-e-lethanshar
authored andcommitted
Dialog - re add ref in PanViewConsumer (#530)
* Dialog - re add ref in PanViewConsumer * Add TODO to remove
1 parent 134fc2b commit 8948e3a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/components/panningViews/asPanViewConsumer.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@ import PanningContext from './panningContext';
33

44
function asPanViewConsumer(WrappedComponent) {
55
class PanViewConsumer extends Component {
6+
// TODO: remove when removing PanDismissibleView
7+
saveRef = r => {
8+
this.contentRef = r;
9+
};
610

711
render() {
812
return (
913
<PanningContext.Consumer>
10-
{context => <WrappedComponent context={context} {...this.props}/>}
14+
{context => <WrappedComponent ref={this.saveRef} context={context} {...this.props}/>}
1115
</PanningContext.Consumer>
1216
);
1317
}

0 commit comments

Comments
 (0)