File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -13,8 +13,8 @@ class Selector extends React.Component {
1313 return (
1414 < select
1515 className = { this . props . cssClasses . root }
16+ defaultValue = { currentValue }
1617 onChange = { handleChange }
17- value = { currentValue }
1818 >
1919 { options . map ( ( option ) => {
2020 return < option className = { this . props . cssClasses . item } key = { option . value } value = { option . value } > { option . label } </ option > ;
Original file line number Diff line number Diff line change @@ -29,8 +29,8 @@ describe('Selector', () => {
2929 expect ( out ) . toEqualJSX (
3030 < select
3131 className = "custom-root"
32+ defaultValue = "index-a"
3233 onChange = { ( ) => { } }
33- value = "index-a"
3434 >
3535 < option className = "custom-item" value = "index-a" > Index A</ option >
3636 < option className = "custom-item" value = "index-b" > Index B</ option >
@@ -50,8 +50,8 @@ describe('Selector', () => {
5050 expect ( out ) . toEqualJSX (
5151 < select
5252 className = "custom-root"
53+ defaultValue = { 10 }
5354 onChange = { ( ) => { } }
54- value = { 10 }
5555 >
5656 < option className = "custom-item" value = { 10 } > 10 results per page</ option >
5757 < option className = "custom-item" value = { 20 } > 20 results per page</ option >
You can’t perform that action at this time.
0 commit comments