diff --git a/invenio_requests/assets/semantic-ui/js/invenio_requests/search/RequestsResults.js b/invenio_requests/assets/semantic-ui/js/invenio_requests/search/RequestsResults.js index 3fda59fa..2f1fd624 100644 --- a/invenio_requests/assets/semantic-ui/js/invenio_requests/search/RequestsResults.js +++ b/invenio_requests/assets/semantic-ui/js/invenio_requests/search/RequestsResults.js @@ -7,7 +7,7 @@ import { InvenioSearchPagination } from "@js/invenio_search_ui/components"; import { i18next } from "@translations/invenio_requests/i18next"; import PropTypes from "prop-types"; -import React from "react"; +import React, { useCallback } from "react"; import { Count, ResultsList, Sort } from "react-searchkit"; import { Grid, Segment } from "semantic-ui-react"; @@ -17,6 +17,10 @@ export const RequestsResults = ({ currentResultsState, }) => { const { total } = currentResultsState.data; + + const handleMathjaxCallback = useCallback(() => { + window.MathJax?.typeset(); + }, []); return ( total && ( <Grid> @@ -55,7 +59,7 @@ export const RequestsResults = ({ </Grid.Row> <Grid.Row> <Grid.Column> - <ResultsList /> + <ResultsList onRender={handleMathjaxCallback} /> </Grid.Column> </Grid.Row> </Grid>