Commit 9e606867 authored by Elias Asikainen's avatar Elias Asikainen
Browse files

not et final push of yesterday's today

parent 5342663e
......@@ -8,7 +8,11 @@ export default class DropdownComponent {
return m(
'select',
{ onchange: m.withAttr('value', vnode.selectedId), ...this.defaultProps, ...vnode.attrs },
[vnode.attrs.data.map(label => m('option', { value: label.id }, label.name))]
[
vnode.attrs.data.map(label =>
m('option', { value: label.id, onklick: vnode.attrs.onselect }, label.name)
),
]
);
}
}
......@@ -64,7 +64,6 @@ export default class studydocList {
this.filter[key] = filterValue;
});
}
static selectDocument(doc) {
this.doc = doc;
}
......@@ -145,7 +144,9 @@ export default class studydocList {
{ id: 5, name: '5. Semester' },
{ id: 6, name: '6. Semester' },
],
onchange: sem => console.log(sem), // ({this.semester = semester})
onchange: event => {
this.semester = event.target.value;
},
}),
]),
m(Button, {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment