Closed TheOtherDude closed 6 years ago
I discussed alternatives with @notmessenger and @juwara0 . One theory was that using a computed property that returned copies of these named properties might work. I tried it, but unfortunately the tests still failed.
@readOnly
@computed('items')
computedItems (items) {
return items.slice()
},
{{to-elsewhere
named=renderTarget
send=(component 'frost-select-dropdown'
$element=$element
filter=filter
hook=hook
items=computedItems
multiselect=multiselect
onClose=(action 'closeDropDown')
onFilterInput=(action 'filterInput')
onSelect=(action 'selectItem')
selectedItems=selectedItems
wrapLabels=wrapLabels
)
}}
Doesn't work ^
@TheOtherDude It's because https://github.com/ciena-frost/ember-frost-core/blob/master/addon/components/frost-select-dropdown.js#L184 is not watching items.[]
. This might actually be the entire problem at play here.
I've confirmed that watching items.[]
makes no difference.
Logging does not even trigger in the computed property when items
is updated. If I add {{log computedItems}}
to the template, then I can see it recomputing, but the drop down still does not re-render.
This project uses semver, please check the scope of this pr:
CHANGELOG