Fix Select value/selected React warning

Summary:
React outputs the following error:
  Warning: Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>.

This fixes it by using value instead of selected.

Reviewed By: danielbuechele

Differential Revision: D15535717

fbshipit-source-id: eb784ba2cdefe1c6744cc15592cd3e0191d237d0
This commit is contained in:
John Knox
2019-05-30 03:12:38 -07:00
committed by Facebook Github Bot
parent 79902cd7cb
commit 2221090037
2 changed files with 6 additions and 3 deletions

View File

@@ -698,7 +698,9 @@ export default class DatabasesPlugin extends FlipperPlugin<
obj[item] = item;
return obj;
}, {})}
selected={String(this.state.selectedDatabase)}
selected={
this.state.databases[this.state.selectedDatabase - 1]?.name
}
onChange={this.onDatabaseSelected}
/>
<BoldSpan style={{marginLeft: 16, marginRight: 16}}>Table</BoldSpan>