Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 10:20
    greenkeeper[bot] labeled #5426
  • 10:20
    greenkeeper[bot] opened #5426
  • 10:19

    greenkeeper[bot] on can-attribute-observable-2.0.2

    fix(package): update can-attrib… (compare)

  • Nov 18 21:05

    nlundquist on master

    Update dist for release (compare)

  • Nov 18 21:05

    nlundquist on v6.2.6

    Update dist for release 6.2.6 (compare)

  • Nov 18 20:22
    cherifGsoul review_requested #5425
  • Nov 18 20:22
    cherifGsoul commented #5425
  • Nov 18 20:19
    cherifGsoul synchronize #5425
  • Nov 18 20:19

    cherifGsoul on obserbale-properties-update-debugging-guid

    Fix observable properties wordi… (compare)

  • Nov 18 20:12

    nlundquist on master

    update can-stache-converters de… (compare)

  • Nov 18 20:12
    nlundquist closed #5424
  • Nov 18 19:24
    cherifGsoul review_requested #5425
  • Nov 18 19:24
    cherifGsoul opened #5425
  • Nov 18 19:21

    cherifGsoul on obserbale-properties-update-debugging-guid

    Remove ViewModel wording from d… (compare)

  • Nov 18 19:20

    phillipskevin on same-as-master

    (compare)

  • Nov 17 21:58
  • Nov 14 17:40
    nlundquist edited #5424
  • Nov 14 17:40
    nlundquist edited #5424
  • Nov 14 17:39
    nlundquist opened #5424
  • Nov 14 17:39
    nlundquist review_requested #5424
Patrick Clancy
@patrickclancy
WebSocket connection to 'ws://localhost:8012/' failed
Opps… ignore
Matthew Phillips
@matthewp
heh
that's live-reload i bet
Patrick Clancy
@patrickclancy
yea… didn’t mean to paste my error here. But I am working through it
Justin Meyer
@justinbmeyer
@akagomez not with can.stache
can.stache needs to create elements in clone-able fragments
what you show is possible, but would be tricky
is possible to make stache do, but not easily
instead, I do what @alexisabril and have a helper
Andrei Balmus
@abalmush
Hello guys, quick question: Is it possible to attache can.Component to an existing custom tag without can.view ?
Chris Gomez
@akagomez
@abalmush As far as I know, no.
Andrei Balmus
@abalmush
@akagomez, thank you so much
Matthew Phillips
@matthewp
that's because you've overwritten parent.prototype.define
whoops, i just responded to a comment from a few days ago
carry on
Justin Meyer
@justinbmeyer

@ilyavf asked:

3:18 PM
Do you know why this setter is called twice after a template binding is added? http://jsbin.com/sinunew/edit?js,console,output

Ilya Fadeev
@ilyavf
Yeah, thanks @justinbmeyer . Click update to see it. If you remove the binding declaration from the template, the setter is called once.
Justin Meyer
@justinbmeyer
@ilyavf so is the button or anything related to this?
like, does there even have to be a component?
to see the problem
could you just pass a map with similar defined behavior?
Ilya Fadeev
@ilyavf
ok, will do
like, with a bind() ?
Justin Meyer
@justinbmeyer
oh, I have to click update to see the problem?
Ilya Fadeev
@ilyavf
yes, u have to click
Justin Meyer
@justinbmeyer
this is most likely b/c of the two-way binding
clicking update changes child's searchTerms, which changes parent's myval, which again tries to change child's searchTerms
oh, those only track one direction
we might need to add the other direction
viewModelPropertyUpdates[searchTerms] will be true only after parent's myval changes
we could have a similar protection coming back the other way
Justin Meyer
@justinbmeyer
basically when parent CHANGES child ... we protect against child then changing the parent
but when child CHANGES parent ... we don't currently protect the parent from trying to change the child as a result
Ilya Fadeev
@ilyavf
what line would this be ("when child changes parent")?
Justin Meyer
@justinbmeyer
this is something for @daffl to be aware of
that's the code that runs when a child's viewModel is changed
easier to read in minor
b/c variables are properly called viewModel there
that code is what listens to the child viewModel and sets up two-way binding
well, the child -> parent binding
that code listens on the value passed to the component ... essentially setting up parent -> child binding
Ilya Fadeev
@ilyavf
@justinbmeyer If I wrap line https://github.com/bitovi/canjs/blob/minor/component/component.js#L171 into an if statement (componentScope[name] !== newVal) this should fix it, right?
Justin Meyer
@justinbmeyer
That would not be a good fix
  • it would not be correct ... it's possible that a setter or getter exists on this property, that what you read there wouldn't be accurate.
  • it's best to never access property values directly on can.maps