Skip to content

Commit

Permalink
fix: restore selectedAmountAsString
Browse files Browse the repository at this point in the history
  • Loading branch information
koko57 committed Aug 11, 2023
1 parent a2dfa8e commit 347ccf1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/pages/iou/steps/MoneyRequestAmountForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,14 @@ function MoneyRequestAmountForm({amount, currency, isEditing, forwardedRef, onCu

const textInput = useRef(null);

const [currentAmount, setCurrentAmount] = useState('');
const selectedAmountAsString = amount ? CurrencyUtils.convertToWholeUnit(currency, amount).toString() : '';

const [currentAmount, setCurrentAmount] = useState(selectedAmountAsString);
const [shouldUpdateSelection, setShouldUpdateSelection] = useState(true);

const [selection, setSelection] = useState({
start: 0,
end: 0,
start: selectedAmountAsString.length,
end: selectedAmountAsString.length,
});

/**
Expand Down

0 comments on commit 347ccf1

Please sign in to comment.