@@ -3,6 +3,7 @@ import {View} from 'react-native';
33import { useOnyx } from 'react-native-onyx' ;
44import Button from '@components/Button' ;
55import FixedFooter from '@components/FixedFooter' ;
6+ import FullScreenLoadingIndicator from '@components/FullscreenLoadingIndicator' ;
67import HeaderWithBackButton from '@components/HeaderWithBackButton' ;
78import ScreenWrapper from '@components/ScreenWrapper' ;
89import SelectionList from '@components/SelectionList' ;
@@ -20,7 +21,7 @@ import ROUTES from '@src/ROUTES';
2021function SearchFiltersStatusPage ( ) {
2122 const styles = useThemeStyles ( ) ;
2223 const { translate} = useLocalize ( ) ;
23- const [ searchAdvancedFiltersForm ] = useOnyx ( ONYXKEYS . FORMS . SEARCH_ADVANCED_FILTERS_FORM , { canBeMissing : true } ) ;
24+ const [ searchAdvancedFiltersForm , searchAdvancedFiltersFormResult ] = useOnyx ( ONYXKEYS . FORMS . SEARCH_ADVANCED_FILTERS_FORM , { canBeMissing : true } ) ;
2425 const currentType = searchAdvancedFiltersForm ?. type ?? CONST . SEARCH . DATA_TYPES . EXPENSE ;
2526 const currentGroupBy = searchAdvancedFiltersForm ?. groupBy ;
2627 const [ selectedItems , setSelectedItems ] = useState < string [ ] > ( ( ) => {
@@ -73,6 +74,10 @@ function SearchFiltersStatusPage() {
7374 Navigation . goBack ( ROUTES . SEARCH_ADVANCED_FILTERS ) ;
7475 } , [ selectedItems ] ) ;
7576
77+ if ( searchAdvancedFiltersFormResult . status === 'loading' ) {
78+ return < FullScreenLoadingIndicator /> ;
79+ }
80+
7681 return (
7782 < ScreenWrapper
7883 testID = { SearchFiltersStatusPage . displayName }
0 commit comments