Skip to content

Commit

Permalink
ReactJS: Don't use 'selected' for '<option/>' nodes (#5965)
Browse files Browse the repository at this point in the history
Signed-off-by: Taylor Smock <[email protected]>
  • Loading branch information
tsmock authored and HelNershingThapa committed Jul 7, 2023
1 parent 0bc1eac commit 030518f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/src/components/projectEdit/settingsForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ export const SettingsForm = ({ languages, defaultLocale }) => {
name="defaultLocale"
onChange={updateDefaultLocale}
className="pa2 bg-white ba ba--grey-light"
value={defaultLocale}
>
{languages.map((l) => (
<option key={l.code} selected={l.code === defaultLocale ? true : false} value={l.code}>
<option key={l.code} value={l.code}>
{l.language} ({l.code})
</option>
))}
Expand Down

0 comments on commit 030518f

Please sign in to comment.