Skip to content

Commit

Permalink
🐛 QuantitySelector - allow quantity to be seen different than init
Browse files Browse the repository at this point in the history
  • Loading branch information
ulricden committed Jan 31, 2024
1 parent 996eaa2 commit 291e31b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/numberSelector/NumberSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@ export const NumberSelector = ({

const [error, setError] = useState(false);
const [focused, setFocused] = useState(false);
const [fieldState, setFieldState] =
useState<FieldState>('filledWithDefault');
const [fieldState, setFieldState] = useState<FieldState>(
value !== initialValue ? 'filled' : 'filledWithDefault',
);

const computeIncrementedValue = (): number => {
return RoundValue(
Expand Down

0 comments on commit 291e31b

Please sign in to comment.