@@ -16,7 +16,7 @@ import type {
1616 GraphZoneType ,
1717 OnFormatCommitDateTime ,
1818} from '@gitkraken/gitkraken-components' ;
19- import GraphContainer , { CommitDateTimeSources , refZone } from '@gitkraken/gitkraken-components' ;
19+ import GraphContainer , { CommitDateTimeSources , noShaHighlightedSha , refZone } from '@gitkraken/gitkraken-components' ;
2020import type { ReactElement } from 'react' ;
2121import React , { createElement , memo , useCallback , useEffect , useMemo , useRef , useState } from 'react' ;
2222import { getPlatform } from '@env/platform' ;
@@ -576,6 +576,13 @@ export const GlGraphReact = memo((initProps: GraphWrapperInitProps) => {
576576 } ;
577577 } ;
578578
579+ let footer ;
580+ if ( props . searchResults ?. count === 0 ) {
581+ footer = < > No results found</ > ;
582+ } else if ( props . searchResults ?. count && ! props . searchResults . paging ?. hasMore && ! props . loading ) {
583+ footer = < > No more results found</ > ;
584+ }
585+
579586 return (
580587 < GraphContainer
581588 ref = { graphRef }
@@ -597,7 +604,11 @@ export const GlGraphReact = memo((initProps: GraphWrapperInitProps) => {
597604 graphRows = { props . rows ?? emptyRows }
598605 hasMoreCommits = { props . paging ?. hasMore }
599606 // Just cast the { [id: string]: number } object to { [id: string]: boolean } for performance
600- highlightedShas = { props . searchResults ?. ids as GraphContainerProps [ 'highlightedShas' ] }
607+ highlightedShas = {
608+ props . searchResults ?. count === 0
609+ ? { [ noShaHighlightedSha ] : true }
610+ : ( props . searchResults ?. ids as GraphContainerProps [ 'highlightedShas' ] )
611+ }
601612 highlightRowsOnRefHover = { config . highlightRowsOnRefHover }
602613 includeOnlyRefsById = { props . includeOnlyRefs }
603614 scrollRowPadding = { config . scrollRowPadding }
@@ -646,6 +657,7 @@ export const GlGraphReact = memo((initProps: GraphWrapperInitProps) => {
646657 themeOpacityFactor = { props . theming ?. themeOpacityFactor }
647658 useAuthorInitialsForAvatars = { ! config . avatars }
648659 workDirStats = { props . workingTreeStats }
660+ customFooterRow = { footer }
649661 />
650662 ) ;
651663} ) ;
0 commit comments