From c9aac47828bc5e03014bd9df80403eb78ff7bf63 Mon Sep 17 00:00:00 2001 From: Tomas Machalek Date: Fri, 15 Nov 2024 09:25:59 +0100 Subject: [PATCH] Fix ajax loader for extended search in query history (quick and ext. search needs a bit different treatment) --- .../js/views/searchHistory/full/index.tsx | 58 ++++++++++++++++--- 1 file changed, 50 insertions(+), 8 deletions(-) diff --git a/public/files/js/views/searchHistory/full/index.tsx b/public/files/js/views/searchHistory/full/index.tsx index f704a2945..1b0eab169 100644 --- a/public/files/js/views/searchHistory/full/index.tsx +++ b/public/files/js/views/searchHistory/full/index.tsx @@ -829,6 +829,48 @@ export function init( ); }; + // -------------------- -------------------------------------- + + const SrchResult:React.FC<{ + searchFormView:'extended'|'quick'; + data:Array; + isBusy:boolean; + offset:number; + hasMoreItems:boolean; + itemsToolbars:Array<[boolean, boolean]>; + searched:boolean; + + }> = (props) => { + if (props.searchFormView === 'quick') { + return <> + {props.data.length > 0 ? + : + null + } + {props.isBusy ? +
: + null + } + ; + + } else { + return <> + {props.isBusy ? +
: + + } + ; + } + }; + // -------------------- ------------------------ const RecentQueriesPageList:React.FC< @@ -856,14 +898,14 @@ export function init( archivedOnly={props.archivedOnly} supportsFulltext={props.supportsFulltext} searchFormView={props.searchFormView} /> - {props.data.length === 0 && props.isBusy ? -
: - - } + }