Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 24 additions & 15 deletions src/pages/iou/request/step/IOURequestStepVendor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -142,21 +142,30 @@ function IOURequestStepVendor({
testID="IOURequestStepVendor"
includeSafeAreaPaddingBottom
>
<SelectionList
data={data}
onSelectRow={selectVendor}
textInputOptions={{
label: translate('common.search'),
value: searchValue,
onChangeText: setSearchValue,
headerMessage,
}}
initiallyFocusedItemKey={shouldShowNoneRow ? undefined : data.find((item) => item.isSelected)?.keyForList}
ListItem={SingleSelectListItem}
shouldShowLoadingPlaceholder={!policy}
listEmptyContent={listEmptyContent}
shouldSingleExecuteRowSelect
/>
{({didScreenTransitionEnd}) => {
// Defer mounting the SelectionList (and its policy-derived data / lazy illustrations)
// until the RHP entry animation ends. First-open cost otherwise lands mid-transition
// and shows up as a backdrop flicker on the underlying expense view.
if (!didScreenTransitionEnd) {
return null;
}
return (
<SelectionList
data={data}
onSelectRow={selectVendor}
textInputOptions={{
label: translate('common.search'),
value: searchValue,
onChangeText: setSearchValue,
headerMessage,
}}
initiallyFocusedItemKey={shouldShowNoneRow ? undefined : data.find((item) => item.isSelected)?.keyForList}
ListItem={SingleSelectListItem}
listEmptyContent={listEmptyContent}
shouldSingleExecuteRowSelect
/>
);
}}
</StepScreenWrapper>
);
}
Expand Down
Loading