This repository was archived by the owner on Dec 28, 2024. It is now read-only.
Update items when selectable property changes, test provided, issue #126#149
Open
globits wants to merge 3 commits intoPolymerElements:masterfrom
Open
Update items when selectable property changes, test provided, issue #126#149globits wants to merge 3 commits intoPolymerElements:masterfrom
globits wants to merge 3 commits intoPolymerElements:masterfrom
Conversation
Contributor
|
+1 |
bicknellr
suggested changes
Jul 17, 2017
Contributor
bicknellr
left a comment
There was a problem hiding this comment.
Thanks for sending this PR. It needs a rebase now that 2.x is out and I left a couple comments but this seems like the right way to fix this issue. 👍
| selectable: String, | ||
| selectable: { | ||
| type: String, | ||
| observer: '_selectableChanged' |
Contributor
There was a problem hiding this comment.
This behavior seems to have all of its observers down in the observers array. I think it might be better to put this one there too.
|
|
||
| _selectableChanged: function() { | ||
| this._updateItems(); | ||
| if (this._shouldUpdateSelection) { |
Contributor
There was a problem hiding this comment.
As of 2.x you don't need to check _shouldUpdateSelection.
|
|
||
| test('`selectIndex()` selects an item with the given index', function() { | ||
| assert.equal(s2.selectedItem, undefined); | ||
| Polymer.Base.async(function() { |
Contributor
There was a problem hiding this comment.
These tests now wait for iron-items-changed, so I think after rebasing you'll find this async delay isn't necessary.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
New PR for obsolete PR #127