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

paper-input file type doesn't call onChange method

未關閉
#453 1 則留言 0 個 reaction 已指派 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 摘要。