These are chat archives for canjs/canjs

Dec 2015
Chris Gomez
Dec 17 2015 16:47

Pre 2.3.X I had a parent <-> child component relationship. Something like this:

// parent.js

scope: {
  options: ['all', 'calls', 'voicemails', 'ims'],
  filterBy: 'all'
// parent.stache

// child.stache

Selected: {{selectedOption}}

  {{#each options}}
    <li can-click="{selectOption}">{{.}}</li>

After updating to 2.3.7 selectedOption will be updated when the user clicks an <li>, but filterBy will not. Do I have to change the syntax that I use to bind filterBy to selectedOption?

Matthew Phillips
Dec 17 2015 16:55
selectOption is a string?
oh, no it's not
is selectOption a function on the child's viewModel?
Chris Gomez
Dec 17 2015 16:59
@matthewp Yes. It basically does this.attr(‘selectedOption’, value).
Josh Dean
Dec 17 2015 17:04
@akagomez isolated
'{scope} value' doesn't trigger
but did in 2.2.9
Chris Gomez
Dec 17 2015 17:08
If you define an argument in get it seems to work.