adopted-ember-addons / adopted-ember-addons/emberx-select

action arguments change order when optional argument is passed in

未關閉
#245 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
JavaScript
星號
198
分支
77
PR 合併指標
30 天內沒有已合併 PR

描述

### Version of x-select:
`^3.1.1`

### Ember Version / Ember CLI Version:

**Ember Version:** `~3.8.0`
**Ember CLI Version:** `~3.8.1`

### Expected Behavior

If one passes in an optional argument to the action on x-select, the order of the arguments received in the action handler will be: 1.`value`, 2.`event`, and 3.`optional`, as per the description in the docs under **Actions and Action Arguments**.

### Actual Behavior

The order is actually: 1. `optional`, 2. `value`, and 3. `event`. The docs should reflect this order, if this is truly the correct order. If this is as simple as updating the README, I'm happy to make a PR.

Let me know if there's something else going on, like a grave misunderstanding on my part.

### Steps To Reproduce:
Check out my twiddle, but in summary:

1. Pass an argument to your action in your template.
2. In your action handler, log the `value`, `event`, and your new argument.
3. See that `value` is really your new argument; order of the other arguments are scrambled, too.
4. Note the behavior is the same regardless of the trigger used (`on-click` vs. `action`).

### Ember Twiddle / Example repo / Failing test:

[Here ya go!](https://ember-twiddle.com/7d7854d766d40886320a54b9a4fd6d5b)

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。