File tree Expand file tree Collapse file tree 3 files changed +7
-0
lines changed
packages/core/src/features Expand file tree Collapse file tree 3 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,9 @@ const withLoadingState = async <T>(
6161 items . filter ( ( id ) => id !== itemId ) ,
6262 ) ;
6363 }
64+ } else {
65+ // immediately completed, await anyway to keep errors in the same execution flow
66+ await prom ;
6467 }
6568} ;
6669
Original file line number Diff line number Diff line change @@ -58,5 +58,6 @@ export const syncDataLoaderFeature: FeatureImplementation = {
5858
5959 itemInstance : {
6060 isLoading : ( ) => false ,
61+ hasLoadedData : ( ) => true ,
6162 } ,
6263} ;
Original file line number Diff line number Diff line change @@ -27,7 +27,10 @@ export type SyncDataLoaderFeatureDef<T> = {
2727 retrieveChildrenIds : ( itemId : string , skipFetch ?: boolean ) => string [ ] ;
2828 } ;
2929 itemInstance : {
30+ /** Returns false. Provided for consistency with async data loader */
3031 isLoading : ( ) => boolean ;
32+ /** Returns true. Provided for consistency with async data loader */
33+ hasLoadedData : ( ) => boolean ;
3134 } ;
3235 hotkeys : never ;
3336} ;
You can’t perform that action at this time.
0 commit comments