Skip to content

Commit

Permalink
fix: set proper value while for combobox
Browse files Browse the repository at this point in the history
  • Loading branch information
peckz committed Sep 24, 2024
1 parent 05ef190 commit 6249e82
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions pages/utilities/number-base-changer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,12 @@ export default function NumberBaseChanger() {
<Combobox
data={data}
value={base.from.toString()}
onSelect={(value) => switchValues}
onSelect={(value) => {
setBase((prev) => ({
...prev,
from: parseInt(value),
}));
}}
/>
</div>
<div className="flex flex-col justify-end">
Expand All @@ -84,7 +89,9 @@ export default function NumberBaseChanger() {
<Combobox
data={data}
value={base.to.toString()}
onSelect={(value) => switchValues}
onSelect={(value) => {
setBase((prev) => ({ ...prev, to: parseInt(value) }));
}}
/>
</div>
</div>
Expand Down

0 comments on commit 6249e82

Please sign in to comment.