Skip to content

Commit

Permalink
fix(select): use value instead of selected option
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Nov 24, 2023
1 parent 9a06cf5 commit a03cc11
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/components/elements/Select/Select.stories.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const MySelect = ({ ...props }) => {
return (
<Select
onChange={event => {
event.preventDefault()
const language = event.target.value
setState(language)
}}
Expand Down Expand Up @@ -39,16 +38,15 @@ const MySelectWithDefault = ({ placeholder, ...props }) => {
return (
<Select
onChange={event => {
event.preventDefault()
const language = event.target.value
setState(language)
}}
selected={lang}
value={placeholder}
color={lang === placeholder ? 'black60' : 'inherit'}
{...props}
>
{[
<option key={placeholder} disabled selected hidden>
<option key={placeholder} disabled hidden>
{placeholder}
</option>
].concat(
Expand Down

0 comments on commit a03cc11

Please sign in to comment.