@@ -50,15 +50,13 @@ import {
5050 createSortByHandler ,
5151 createSortDirHandler ,
5252 normalizeSearchQueryParams ,
53- deriveSearchType ,
5453} from '../../../helpers/searchHelpers' ;
5554import {
5655 setSearchPageAdvanced ,
5756 setSearchPageAdvancedLimitBy ,
5857 setSearchPageAdvancedSearchTerms ,
5958 setSearchPageKeyword ,
6059} from '../../../actions/searchPage' ;
61- import { readListItems } from '../../search/searchResultHelpers' ;
6260
6361const selectBarPropTypes = {
6462 toggleBar : PropTypes . object ,
@@ -286,15 +284,10 @@ function SearchResults(props) {
286284 const isSidebarOpen = useSelector ( ( state ) => isSearchResultSidebarOpen ( state ) ) ;
287285 const display = currentView ( props ) ;
288286
289- // use the list items size to handle the seeded empty result conflicting with errors
290- const { listType } = deriveSearchType ( config , SEARCH_RESULT_PAGE_SEARCH_NAME , searchDescriptor ) ;
291- const { items } = readListItems ( config , listType , searchResults ) ;
292- const searchResultsSize = items ?. size ?? 0 ;
293-
294287 useEffect ( ( ) => {
295288 setPreferredPageSize ( props , dispatch ) ;
296289 dispatch ( search ( config , SEARCH_RESULT_PAGE_SEARCH_NAME , searchDescriptor ) ) ;
297- } , [ searchDescriptor . toString ( ) , searchResultsSize ] ) ;
290+ } , [ searchDescriptor . toString ( ) ] ) ;
298291
299292 const handlePageSizeChange = createPageSizeChangeHandler ( {
300293 history,
@@ -392,11 +385,16 @@ function SearchResults(props) {
392385 searchDisplay = < SearchResultTable searchDescriptor = { searchDescriptor } /> ;
393386 }
394387
388+ const handleBatchInvokeComplete = ( ) => {
389+ dispatch ( search ( config , SEARCH_RESULT_PAGE_SEARCH_NAME , searchDescriptor ) ) ;
390+ } ;
391+
395392 const sidebar = (
396393 < SearchResultSidebar
397394 config = { config }
398395 history = { history }
399396 isOpen = { isSidebarOpen }
397+ onInvokeComplete = { handleBatchInvokeComplete }
400398 recordType = { searchDescriptor . get ( 'recordType' ) }
401399 />
402400 ) ;
0 commit comments