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

paper-button async aware

Đang mở
#569 10 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
JavaScript
Star
879
Fork
327
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

Would be nice if the paper-button could be async aware, that is accept a promise as a return value on the `onClick` action, mainly for the form usecase.

```hbs
{{#paper-button type='submit' onClick=(action returnsPromise)}}
Submit
{{else}}
Submitting..
{{/paper-button}}
```

Or if the form component handles the action, it could pass down the promise in the yields:

```hbs
{{#paper-form onsubmit=(action withPromise) as |f|}}
{{#f.submit-button}}
Submit
{{else}}
Submitting..
{{/f.submit-button}}
{{/paper-form}}
```

Where the form passed it down:
```hbs
{{yield (hash
submit-button=(component 'paper-button' promise=submitPromise)
)}}
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.