mirror of
https://github.com/flarum/framework.git
synced 2025-05-22 22:59:57 +08:00
Extensibility: discussion list params
Also give the root controller the name of the current route so they can easily route back to it
This commit is contained in:
@ -5,7 +5,7 @@ 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}, [
|
||||
this.props.options.map(function(option) { return m('option', {value: option.key}, option.value) })
|
||||
Object.keys(this.props.options).map(key => m('option', {value: key}, this.props.options[key]))
|
||||
]),
|
||||
icon('sort')
|
||||
])
|
||||
|
@ -1,6 +1,7 @@
|
||||
export default function mapRoutes(routes) {
|
||||
var map = {};
|
||||
for (var r in routes) {
|
||||
routes[r][1].props.routeName = r;
|
||||
map[routes[r][0]] = routes[r][1];
|
||||
}
|
||||
return map;
|
||||
|
Reference in New Issue
Block a user