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

selectedItems creates a new array with each change instead of modify the current one #152

Open
8 tasks done
jorgecasar opened this issue Apr 26, 2017 · 0 comments
Open
8 tasks done

Comments

@jorgecasar
Copy link

jorgecasar commented Apr 26, 2017

Description

Property selectedItems set a new array with each change instead off notify the additions or eliminations. This causes erratic behavior by observing nodes created from selectedItems

Expected outcome

Keep the reference value in the property and change the values.

Actual outcome

Change the array reference, creating a new one.

Live Demo

Current behavior
The selected items are managed wrong and the observer generate inconsistent data.
https://jsbin.com/fozihiw/edit?html,console,output

New behavior
The selected items are managed well
https://jsbin.com/qobuzeg/edit?html,console,output

Steps to reproduce

  1. Use an iron-selector or any element which implement iron-selectable
  2. Set multi attribute
  3. Use selectedItems in a dom-repeat
  4. Select elements and unselect in reverse order (FILO stack).

Browsers Affected

  • Chrome
  • Firefox
  • Safari 9
  • Safari 8
  • Safari 7
  • Edge
  • IE 11
  • IE 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant