mirror of
https://github.com/flarum/framework.git
synced 2024-12-11 13:05:50 +08:00
ffc2863f70
Also give the root controller the name of the current route so they can easily route back to it
14 lines
454 B
JavaScript
14 lines
454 B
JavaScript
import Component from 'flarum/component'
|
|
import icon from 'flarum/helpers/icon';
|
|
|
|
export default class SelectInput extends Component {
|
|
view(ctrl) {
|
|
return m('span.select-input', [
|
|
m('select.form-control', {onchange: m.withAttr('value', this.props.onchange.bind(ctrl)), value: this.props.value}, [
|
|
Object.keys(this.props.options).map(key => m('option', {value: key}, this.props.options[key]))
|
|
]),
|
|
icon('sort')
|
|
])
|
|
}
|
|
}
|