Reflect current view in dropdown

Useful if the view is toggled between inspect and map via keyboard
shortcut.
This commit is contained in:
Alexander Clausen 2019-01-06 06:20:03 +01:00
parent 6cf861d44e
commit 14e0385575

View file

@ -198,7 +198,7 @@ export default class Toolbar extends React.Component {
<ToolbarSelect wdKey="nav:inspect">
<MdFindInPage />
<IconText>View </IconText>
<select onChange={(e) => this.handleSelection(e.target.value)}>
<select onChange={(e) => this.handleSelection(e.target.value)} value={currentView.id}>
{views.map((item) => {
return (
<option key={item.id} value={item.id}>