MCPcopy Create free account
hub / github.com/alephdata/aleph / componentDidUpdate

Method componentDidUpdate

ui/src/viewers/PdfViewer.jsx:43–65  ·  view source on GitHub ↗
(prevProps)

Source from the content-addressed store, hash-verified

41 }
42
43 componentDidUpdate(prevProps) {
44 const { countQuery } = this.props;
45 if (this.state.width === null) {
46 this.onResize();
47 }
48 if (
49 this.props.activeMode !== prevProps.activeMode ||
50 this.props.pdfUrl !== prevProps.pdfUrl
51 ) {
52 clearTimeout(this.resizeTimeout);
53 this.onResize();
54 this.resizeTimeout = setTimeout(() => {
55 this.onResize();
56 }, 350);
57 }
58 if (prevProps.rotate !== this.props.rotate) {
59 this.setRotation();
60 }
61 if (!countQuery.sameAs(prevProps.countQuery)) {
62 this.onResize();
63 this.fetchPage();
64 }
65 }
66
67 componentWillUnmount() {
68 clearTimeout(this.resizeTimeout);

Callers

nothing calls this directly

Calls 4

onResizeMethod · 0.95
setRotationMethod · 0.95
fetchPageMethod · 0.95
sameAsMethod · 0.80

Tested by

no test coverage detected