Skip to content

Commit

Permalink
revert(route-viewer): never hide mode selector
Browse files Browse the repository at this point in the history
  • Loading branch information
miles-grant-ibigroup committed Aug 23, 2021
1 parent 0478aac commit 67f840b
Showing 1 changed file with 17 additions and 20 deletions.
37 changes: 17 additions & 20 deletions lib/components/viewers/route-viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,29 +129,26 @@ class RouteViewer extends Component {
</option>
))}
</select>
{/* Do not show a mode selector that can't change anything */}
{modes.length > 2 && (
<select
aria-label='Mode Filter'
id='mode'
onBlur={this.onFilterChange}
onChange={this.onFilterChange}
value={filter.mode || ''}
>
<option value={''}>
<select
aria-label='Mode Filter'
id='mode'
onBlur={this.onFilterChange}
onChange={this.onFilterChange}
value={filter.mode || ''}
>
<option value={''}>
{intl.formatMessage({
id: 'components.RouteViewer.allModes'
})}
</option>
{modes.map((mode) => (
<option key={mode} value={mode.toUpperCase()}>
{intl.formatMessage({
id: 'components.RouteViewer.allModes'
id: `common.otpTransitModes.${mode.toLowerCase()}`
})}
</option>
{modes.map((mode) => (
<option key={mode} value={mode.toUpperCase()}>
{intl.formatMessage({
id: `common.otpTransitModes.${mode.toLowerCase()}`
})}
</option>
))}
</select>
)}
))}
</select>
</span>
<span className='routeSearch'>
<Icon type='search' />
Expand Down

0 comments on commit 67f840b

Please sign in to comment.