diff --git a/invenio_requests/assets/semantic-ui/js/invenio_requests/timeline/TimelineFeed.js b/invenio_requests/assets/semantic-ui/js/invenio_requests/timeline/TimelineFeed.js index 0bd617e9..0c6a7fff 100644 --- a/invenio_requests/assets/semantic-ui/js/invenio_requests/timeline/TimelineFeed.js +++ b/invenio_requests/assets/semantic-ui/js/invenio_requests/timeline/TimelineFeed.js @@ -15,6 +15,7 @@ import { Pagination } from "../components/Pagination"; import RequestsFeed from "../components/RequestsFeed"; import { TimelineCommentEditor } from "../timelineCommentEditor"; import { TimelineCommentEventControlled } from "../timelineCommentEventControlled"; +import _ from "lodash"; class TimelineFeed extends Component { constructor(props) { @@ -31,6 +32,14 @@ class TimelineFeed extends Component { getTimelineWithRefresh(); } + componentDidUpdate(prevProps) { + const { timeline } = this.props; + + if (!_.isEqual(prevProps.timeline, timeline) && timeline?.hits?.total > 0) { + window.MathJax?.typeset(); + } + } + componentWillUnmount() { const { timelineStopRefresh } = this.props; timelineStopRefresh();