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

action arguments change order when optional argument is passed in

Aberta
#245 0 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
JavaScript
Estrelas
198
Forks
77
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

### 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)

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.