Skip to content

Commit f97e542

Browse files
committed
added comments
1 parent dcd606f commit f97e542

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

src/components/Search/SearchPageHeader/SearchTypeMenuPopover.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ function SearchTypeMenuPopover({queryJSON}: SearchTypeMenuNarrowProps) {
4242
scrollContainerStyle={styles.pv0}
4343
/>
4444
)}
45+
{/* DeleteConfirmModal is a stable JSX element returned by the hook.
46+
Returning the element directly keeps the component identity across re-renders so React
47+
can play its exit animation instead of removing it instantly. */}
4548
{DeleteConfirmModal}
4649
</>
4750
);

src/pages/Search/SearchTypeMenu.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,9 @@ function SearchTypeMenu({queryJSON}: SearchTypeMenuProps) {
277277
<View>
278278
<Text style={styles.sectionTitle}>{translate('search.savedSearchesMenuItemTitle')}</Text>
279279
{renderSavedSearchesSection(savedSearchesMenuItems)}
280+
{/* DeleteConfirmModal is a stable JSX element returned by the hook.
281+
Returning the element directly keeps the component identity across re-renders so React
282+
can play its exit animation instead of removing it instantly. */}
280283
{DeleteConfirmModal}
281284
</View>
282285
)}

0 commit comments

Comments
 (0)