From 32537e9d1d3e56c9e686eb7d15092375dc1b8d33 Mon Sep 17 00:00:00 2001 From: Anika Churilova <61321254+anikachurilova@users.noreply.github.com> Date: Wed, 2 Oct 2024 12:06:40 +0200 Subject: [PATCH] search results: add callback hook on search results rendered * closes https://github.com/CERNDocumentServer/cds-rdm/issues/198 --- .../js/invenio_requests/search/RequestsResults.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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..f35170f3 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 @@ -17,6 +17,10 @@ export const RequestsResults = ({ currentResultsState, }) => { const { total } = currentResultsState.data; + + const handleResultsRendered = () => { + window.invenio?.onSearchResultsRendered(); + }; return ( total && ( @@ -55,7 +59,7 @@ export const RequestsResults = ({ - +