Skip to content

Commit

Permalink
added enter on createunit pt2
Browse files Browse the repository at this point in the history
  • Loading branch information
gyordong committed Nov 25, 2024
1 parent 50ab201 commit b9599f5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/client/app/components/unit/CreateUnitModalComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ export default function CreateUnitModalComponent() {
setCustomRate(Number(rate));
setRate(CUSTOM_INPUT);
setShowCustomInput(isCustom);
setCanSave(false);
} else {
setRate(value);
setState({ ...state, secInRate: Number(value) });
Expand Down Expand Up @@ -124,7 +125,7 @@ export default function CreateUnitModalComponent() {
setValidUnit(
state.name !== '' && (state.typeOfUnit !== UnitType.suffix
|| state.suffix !== '') && customRateValid(Number(state.secInRate)) &&
canSave
(canSave || !isCustomRate(state.secInRate))
);
}, [state.name, state.secInRate, state.typeOfUnit, state.suffix, canSave]);

Expand Down

0 comments on commit b9599f5

Please sign in to comment.