Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 13:09

    greenkeeper[bot] on steal-tools-2.2.3

    (compare)

  • 12:55

    greenkeeper[bot] on steal-tools-2.2.3

    chore(package): update steal-to… (compare)

  • 01:44

    greenkeeper[bot] on @webcomponents

    (compare)

  • 01:42

    greenkeeper[bot] on @webcomponents

    chore(package): update @webcomp… (compare)

  • Nov 12 05:28
    greenkeeper[bot] commented #5392
  • Nov 12 05:28

    greenkeeper[bot] on core-js-3.4.1

    chore(package): update core-js … (compare)

  • Nov 11 18:03
    greenkeeper[bot] labeled #5422
  • Nov 11 18:03
    greenkeeper[bot] opened #5422
  • Nov 11 18:03

    greenkeeper[bot] on @feathersjs

    chore(package): update @feather… (compare)

  • Nov 11 18:02
    greenkeeper[bot] commented #5401
  • Nov 11 18:02

    greenkeeper[bot] on @feathersjs

    chore(package): update @feather… (compare)

  • Nov 10 23:39

    greenkeeper[bot] on @octokit

    (compare)

  • Nov 10 23:37

    greenkeeper[bot] on @octokit

    chore(package): update @octokit… (compare)

  • Nov 08 16:08
    greenkeeper[bot] labeled #5421
  • Nov 08 16:08
    greenkeeper[bot] opened #5421
  • Nov 08 16:08

    greenkeeper[bot] on can-stache-bindings-5.0.2

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

  • Nov 07 17:31

    cherifGsoul on 6-2-5-version

    (compare)

  • Nov 07 17:31
    cherifGsoul closed #5420
  • Nov 07 17:30

    cherifGsoul on master

    Update dist for release (compare)

  • Nov 07 17:28
    cherifGsoul edited as member
Justin Meyer
@justinbmeyer
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
also, in reality ... can.Map already has internal checks for this
the setter is still called
but an event wont be produced
all we are doing here is making sure sets aren't called unnecessarily
btw, is this causing a real problem in your app?
if so ... that makes me think your setter has strange side-effects
Ilya Fadeev
@ilyavf
i had to put a fix (manually check in my setter if current value is different from a prev one)
Justin Meyer
@justinbmeyer
why?
if the setter returned the same value