Skip to content

Commit

Permalink
Fixes support for triggers refresh on binary file attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
Sleeckx committed Apr 25, 2017
1 parent 7d49e7c commit 4e4986e
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,13 @@ namespace Vidyano.WebComponents.Attributes {
private _inputContainer: HTMLDivElement;
private _inputAttribute: Vidyano.PersistentObjectAttribute;

private _change(e: Event) {
private async _change(e: Event) {
const targetInput = <HTMLInputElement>e.target;
if (targetInput.files && targetInput.files.length > 0)
if (targetInput.files && targetInput.files.length > 0) {
this.value = targetInput.files[0].name;
if (this.attribute.triggersRefresh)
await this.attribute._triggerAttributeRefresh(true);
}
}

private _registerInput(attribute: Vidyano.PersistentObjectAttribute, isAttached: boolean) {
Expand Down

0 comments on commit 4e4986e

Please sign in to comment.