src/component/routeSelector.js
// Change listener to handle route selection
Change listener to handle route selection
Change listener to handle route selection
optionSelect(ev) {
        let allOptions = [...ev.target.options]
        let selectedOptions = []
        selectedOptions = allOptions.filter((option) => {
            return (option.selected)
        }).map(option => {
            return option.value
        })
        let selectedRoutes = (selectedOptions.indexOf("all")<0) ? [...selectedOptions] : ["all"]
        this.setState({selectedRoutes : selectedRoutes})
    }
optionSelect ( ev ) { let allOptions = [ ... ev . target . options ] let selectedOptions = [ ] selectedOptions = allOptions . filter ( ( option ) => { return ( option . selected ) } ) . map ( option => { return option . value } ) let selectedRoutes = ( selectedOptions . indexOf ( "all" ) < 0 ) ? [ ... selectedOptions ] : [ "all" ] this . setState ( { selectedRoutes : selectedRoutes } ) }
Change listener to handle route selection
Change listener to handle route selection