Skip to content

Commit

Permalink
fix form selection
Browse files Browse the repository at this point in the history
  • Loading branch information
cohenaj194 committed Sep 12, 2024
1 parent c4cf752 commit 26509b6
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions app/routes/wow.export-search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -268,19 +268,16 @@ const ExportSearch = () => {
}
}}
/>
{/* the api uses a number but the users understand it as text
instead of a number make text so the users see the text but the api calls a number
3 is "FULL"
2 is "HIGH"
1 is "MEDIUM"
0 is "LOW"
*/}
<InputWithLabel
labelTitle={inputMap.populationBlizz}
defaultValue={loaderData.populationBlizz}
<Select
title={inputMap.populationBlizz}
defaultValue={loaderData.populationBlizz.toString()}
name="populationBlizz"
type="number"
min={0}
options={[
{ label: 'FULL', value: '3' },
{ label: 'HIGH', value: '2' },
{ label: 'MEDIUM', value: '1' },
{ label: 'LOW', value: '0' }
]}
onChange={(e) => {
const value = e.currentTarget.value
if (value !== null || value !== undefined) {
Expand Down

0 comments on commit 26509b6

Please sign in to comment.