Skip to content
Snippets Groups Projects
Commit aa66d072 authored by Sandro Lutz's avatar Sandro Lutz
Browse files

Fix button redraw issue (Resolves #15)

parent 63353779
No related branches found
No related tags found
No related merge requests found
...@@ -35,6 +35,10 @@ export default class ButtonComponent { ...@@ -35,6 +35,10 @@ export default class ButtonComponent {
}; };
} }
onbeforeupdate(vnode) {
this.defaultProps.disabled = vnode.attrs.active === false;
}
view(vnode) { view(vnode) {
return m(Button, { ...this.defaultProps, ...vnode.attrs }); return m(Button, { ...this.defaultProps, ...vnode.attrs });
} }
......
...@@ -133,6 +133,8 @@ export default class studydocNew { ...@@ -133,6 +133,8 @@ export default class studydocNew {
this.doc.files = e.target.files; this.doc.files = e.target.files;
if (this.doc.files.length > 0) { if (this.doc.files.length > 0) {
this.isValid = true; this.isValid = true;
} else {
this.isValid = false;
} }
}, },
}), }),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment