Implements attr-for-selected, selected-attr, and selected-item#66
Implements attr-for-selected, selected-attr, and selected-item#66bennypowers wants to merge 6 commits intoFabricElements:masterfrom
Conversation
| * @param {Event} event Polymer change event | ||
| */ | ||
| onSelectedItemChanged(event) { | ||
| this._setSelectedItem(event.detail.value); |
There was a problem hiding this comment.
There was a problem hiding this comment.
I think it's better to set it based off the iron-selector's selectedItem prop, than to create our own with bracket syntax.
In general I prefer smaller single-purpose methods, rather than do-it-all observers. I'll make a commit which removes the call to _setSelectedItem in _selectedObserver, or if you like I can remove the listener and change the call in _selectedObserver to _setSelectedItem(this.$.selector.selectedItem)
There was a problem hiding this comment.
I can remove the listener and change the call in _selectedObserver to _setSelectedItem(this.$.selector.selectedItem)
That sounds reasonable, but I was trying to use attr-for-selected and it didn't work, many pieces of this component depend on numerical index values right now, so a lot of work is required.
If you want to give it a shot I think the first step is to replace _children and all its related logic with iron-selector's items.
There was a problem hiding this comment.
I think the way forward is to use Polymer.IronSelectableBehavior instead of instantiating <iron-selector> in the template. I'll get working on it in this PR
Does what it says on the box.
also fixes a typo