import React, { PropTypes } from 'react' import FontAwesome from 'react-fontawesome' import Icon from '../Icon' import * as helpers from '../../helpers' export default class SearchURISchemesModal extends React.Component{ constructor(props){ super(props) this.state = { schemes: [] } } componentDidMount(){ this.setState({schemes: Object.assign([],this.props.search_uri_schemes)}) } handleSubmit(e){ this.props.uiActions.set({search_uri_schemes: this.state.schemes}) this.props.uiActions.closeModal() } handleToggle(scheme){ var uri_schemes = this.state.schemes var index = uri_schemes.indexOf(scheme) if (index > -1){ uri_schemes.splice(index,1) } else { uri_schemes.push(scheme) } this.setState(uri_schemes) } render(){ return (

Search sources

Customise the providers used when searching. Reduce the number of providers to speed up your searches. Please note that not all backends support searching by artist, album or playlist.

this.handleSubmit(e)}>
{ this.props.available_uri_schemes.map(scheme => { return (
) }) }
) } }