Skip to content

Commit

Permalink
delay before dismissing modal
Browse files Browse the repository at this point in the history
  • Loading branch information
FitseTLT committed Feb 12, 2025
1 parent 5ddef34 commit dfe9c4a
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, {useMemo, useState} from 'react';
import {View} from 'react-native';
import {InteractionManager, Keyboard, View} from 'react-native';
import {useOnyx} from 'react-native-onyx';
import CategorySelectorModal from '@components/CategorySelector/CategorySelectorModal';
import HeaderWithBackButton from '@components/HeaderWithBackButton';
Expand Down Expand Up @@ -82,7 +82,11 @@ function WorkspaceCategoriesSettingsPage({policy, route}: WorkspaceCategoriesSet
if (categoryID !== selectedCategory.keyForList) {
setWorkspaceDefaultSpendCategory(policyID, groupID, selectedCategory.keyForList);
}
setIsSelectorModalVisible(false);

Keyboard.dismiss();
InteractionManager.runAfterInteractions(() => {
setIsSelectorModalVisible(false);
});
};

return (
Expand Down

0 comments on commit dfe9c4a

Please sign in to comment.