Skip to content
This repository has been archived by the owner on Dec 28, 2024. It is now read-only.

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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant