Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Main input events take object as an argument regardless of the list structure #19

Closed
2 of 3 tasks
Raiondesu opened this issue Mar 30, 2018 · 3 comments · Fixed by #22
Closed
2 of 3 tasks

Main input events take object as an argument regardless of the list structure #19

Raiondesu opened this issue Mar 30, 2018 · 3 comments · Fixed by #22
Assignees
Labels
bug Something isn't working enhancement New feature or request refactoring Code smells, needs refactoring

Comments

@Raiondesu
Copy link
Contributor

Raiondesu commented Mar 30, 2018

I'm submitting a ...

  • bug report
  • feature request
  • support request

What is the current behavior?

select, input and hover events take an object as an item argument, even if the list itself didn't contain objects.

Example:

// Input list:
[ 'apple', 'banana', 'cat' ]

// `select` event's argument if 'banana' is selected
{
  title: 'banana',
  id: 1
}

What is the expected behavior?

The prescribed events should adapt to the current list input whatever the internal converted structure is.

For example:

// Input list:
[ 'apple', 'banana', 'cat' ]

// `select` event's argument if 'banana' is selected
'banana'

What is the motivation / use case for changing the behavior?

Usability.

@Raiondesu Raiondesu added enhancement New feature or request refactoring Code smells, needs refactoring labels Mar 30, 2018
@Raiondesu Raiondesu added the bug Something isn't working label Mar 30, 2018
@kaskar2008
Copy link
Contributor

Good thoughts. Agreed

Raiondesu added a commit that referenced this issue Mar 30, 2018
Raiondesu added a commit that referenced this issue Mar 30, 2018
@Raiondesu
Copy link
Contributor Author

Raiondesu commented Mar 30, 2018

@kaskar2008, the thing is - the change in b3b9282 introduces breaking changes:
everyone using the component now recieves object instead of the plain value, which will not be the case after the proposed update.

@Raiondesu
Copy link
Contributor Author

Anyway, gonna propose a PR for minor version.

@Raiondesu Raiondesu mentioned this issue Mar 31, 2018
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request refactoring Code smells, needs refactoring
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants