Skip to content

Commit

Permalink
feat(md-file): add disabled binding, close #329
Browse files Browse the repository at this point in the history
  • Loading branch information
Thanood committed Dec 22, 2016
1 parent 0309b17 commit f81ac82
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/file/file.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<template>
<div class="file-field input-field">
<div class="btn accent">
<div disabled.bind="disabled" class="btn accent ${disabled ? 'disabled' : ''}">
<span>${mdCaption}</span>
<input type="file" multiple.bind="mdMultiple" files.bind="files" />
<input disabled.bind="disabled" type="file" multiple.bind="mdMultiple" files.bind="files" />
</div>
<div class="file-path-wrapper">
<input class="file-path validate" type="text" value.bind="mdLabelValue" ref="filePath" />
<input disabled.bind="disabled" class="file-path validate" type="text" value.bind="mdLabelValue" ref="filePath" />
</div>
</div>
</template>
1 change: 1 addition & 0 deletions src/file/file.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export class MdFileInput {
@bindable({
defaultBindingMode: bindingMode.twoWay
}) mdLabelValue;
@bindable() disabled = false;
files = [];

_suspendUpdate = false;
Expand Down

0 comments on commit f81ac82

Please sign in to comment.