Skip to content

Commit 7ee4577

Browse files
xxlee0927dannyrb
authored andcommitted
fix: eventlinsteners for functional component (#48)
1 parent 2b6735d commit 7ee4577

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/CornerstoneViewport/CornerstoneViewport.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,10 @@ class CornerstoneViewport extends Component {
278278

279279
if (isOverlayVisible !== prevIsOverlayVisible)
280280
this.setState({ isOverlayVisible });
281+
282+
// Rebind event listeners when props change to handle functional component method
283+
this._bindExternalEventListeners(true);
284+
this._bindExternalEventListeners();
281285
}
282286

283287
/**

0 commit comments

Comments
 (0)