@@ -31,6 +31,7 @@ export type DiscourseContextResults = Awaited<
3131type Props = {
3232 uid : string ;
3333 results ?: DiscourseContextResults ;
34+ overlayRefresh ?: ( ) => void ;
3435} ;
3536
3637const ExtraColumnRow = ( r : Result ) => {
@@ -279,7 +280,7 @@ const ContextTab = ({
279280 < CreateRelationButton
280281 sourceNodeUid = { parentUid }
281282 onClose = { ( ) => {
282- window . setTimeout ( onRefresh , 250 ) ;
283+ window . setTimeout ( onRefresh , 450 , true ) ;
283284 } }
284285 />
285286 < Switch
@@ -316,7 +317,7 @@ const ContextTab = ({
316317 ) ;
317318} ;
318319
319- export const ContextContent = ( { uid, results } : Props ) => {
320+ export const ContextContent = ( { uid, results, overlayRefresh } : Props ) => {
320321 const [ rawQueryResults , setRawQueryResults ] = useState <
321322 Record < string , DiscourseContextResults [ number ] >
322323 > ( { } ) ;
@@ -350,13 +351,16 @@ export const ContextContent = ({ uid, results }: Props) => {
350351 uid,
351352 onResult : addLabels ,
352353 ignoreCache,
353- } ) . finally ( ( ) => setLoading ( false ) ) ;
354+ } ) . finally ( ( ) => {
355+ if ( overlayRefresh ) overlayRefresh ( ) ;
356+ setLoading ( false ) ;
357+ } ) ;
354358 } ,
355- [ uid , setRawQueryResults , setLoading , addLabels ] ,
359+ [ uid , setRawQueryResults , setLoading , addLabels , overlayRefresh ] ,
356360 ) ;
357361
358362 const delayedRefresh = ( ) => {
359- window . setTimeout ( onRefresh , 250 ) ;
363+ window . setTimeout ( onRefresh , 450 , true ) ;
360364 } ;
361365
362366 useEffect ( ( ) => {
0 commit comments