adopted-ember-addons / adopted-ember-addons/ember-paper

paper-input file type doesn't call onChange method

オープン
#453 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
879
フォーク
327
PR マージ指標
30日以内にマージされた PR はありません

説明

When `paper-input type = "file"` the onChange method is never called.

```
#template.hbs
{{paper-input
type="file"
files=files
onChange=(action (mut files))
}}
{{#paper-button onClick=(action 'submit')}}submit{{/paper-button}}

#controller.js
actions: {
submit() {
console.log(this.get('files'));
}
}

```

Below are some conversations about this issue: (from slack #e-paper)

> **shoxter [12:06 PM]**
> In order to support files, it looks like we need to add `onchange` to the HTML input and link it to `passThru` for the user to handle if they want to use `file` inputs.
>
> **miguelcobain [5:09 PM]**
> use an `onchange={{action "onChange"}}` in paper-input template, just like we do for `oninput`
> inside that action, test if `this.get('type') === 'file'`
> and if `textarea` is false

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。