Skip to content

Commit

Permalink
fix: fix initially focused option
Browse files Browse the repository at this point in the history
  • Loading branch information
koko57 committed Apr 22, 2024
1 parent eefa152 commit 5355cca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pages/iou/request/step/IOURequestStepDistanceRate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function IOURequestStepDistanceRate({

const unit = (Object.values(rates)[0]?.unit === CONST.CUSTOM_UNITS.DISTANCE_UNIT_MILES ? translate('common.mile') : translate('common.kilometer')) as Unit;

const initiallyFocusedOption = rates[lastSelectedRateID]?.name ?? CONST.CUSTOM_UNITS.DEFAULT_RATE;
const initiallyFocusedOption = sections.find((item) => item.isSelected)?.keyForList;

function selectDistanceRate(customUnitRateID: string) {
IOU.updateDistanceRequestRate(transactionID, customUnitRateID, policy?.id ?? '');
Expand Down

0 comments on commit 5355cca

Please sign in to comment.