Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 21 19:51
    greenkeeper[bot] commented #5392
  • Nov 21 19:51

    greenkeeper[bot] on core-js-3.4.2

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

  • Nov 20 19:48

    phillipskevin on master

    Update dist for release (compare)

  • Nov 20 19:48

    phillipskevin on v6.2.7

    Update dist for release 6.2.7 (compare)

  • Nov 20 19:30

    phillipskevin on six-two-seven

    (compare)

  • Nov 20 19:30
    phillipskevin closed #5431
  • Nov 20 19:19
    phillipskevin synchronize #5431
  • Nov 20 19:19

    phillipskevin on six-two-seven

    updating dependencies (compare)

  • Nov 20 18:53
    cherifGsoul review_requested #5432
  • Nov 20 18:52
    cherifGsoul opened #5432
  • Nov 20 18:49

    cherifGsoul on update-api-page

    Update API page (compare)

  • Nov 20 17:17
    phillipskevin opened #5431
  • Nov 20 17:17

    phillipskevin on six-two-seven

    updating dependencies (compare)

  • Nov 20 17:11
    cherifGsoul synchronize #5430
  • Nov 20 17:11

    cherifGsoul on update-infrastructure-page

    Update can-queues part (compare)

  • Nov 20 17:08
    cherifGsoul opened #5430
  • Nov 20 17:06

    phillipskevin on can-attribute-observable-2.0.2

    (compare)

  • Nov 20 17:06

    phillipskevin on master

    fix(package): update can-attrib… Merge pull request #5426 from c… (compare)

  • Nov 20 17:06
    phillipskevin closed #5426
  • Nov 20 17:05

    greenkeeper[bot] on can-observable-array-1.0.5

    (compare)

Brad Momberger
@bmomberger-bitovi
OK. So you definitely did the right thing with setting the type to "any" in this child component (in my own experience, the worst thing is dealing with multiple type conversions)
But I think you might have better luck with putting your shared properties like that in an observable state object that gets passed parent-to-child in all cases.
So in the A B and C example above, I want to share foo with two-way into B and C from A, but instead I package up foo into bar which is observable, and then push bar into B and C using one-way binding to-child.
so if B flips the value of bar.foo, C will also see it because it's observing the same object.
Nico R.
@nriesco
the thing is that I don’t have many problems because the binding is mostly to set query conditions to sub elements.. I build a form from several tables each represented by a component, so you can have as many components as you want press save and all gets updated
the value I’m trying to set with the radio button is only important within its model
and is a very weird name: sellsAllCatalogListings so chances are tha I’m not using the same one on another level and that causes trouble
Brad Momberger
@bmomberger-bitovi
Having something with the same name in a parent component shouldn't be an issue. We don't let components leak scope by default
Nico R.
@nriesco
thats good to know
one thing I noticed today though is a lot of warning because of the old style bindings and an incorrect use of the type in my variables, could a warning be related to this issue?
warning 1: WARN: can-define: the definition for ok on DefineMap uses a constructor for "type". Did you mean "Type”?
warning2: WARN: can-stache-bindings: the data binding format {($value)} is deprecated. Use value:bind instead
Brad Momberger
@bmomberger-bitovi
I worked on both of those warning messages, and it's unlikely that the second one is causing a problem.
You should fix that first one, though.
And also give your DefineMap subclasses names. :)
Nico R.
@nriesco
what do you mean?
Brad Momberger
@bmomberger-bitovi
DefineMap.extend("NameForThisMap", { ... })
Nico R.
@nriesco
otherwise I’m extending the whole DefineMap class for the whole app?
Brad Momberger
@bmomberger-bitovi
no, it just doesn't change the name on the constructor
If you extend a DefineMap without a name, it's still got "DefineMap" as the name
which can make it harder to track down "the definition for ok on DefineMap"
can-component actually generates names for the DefineMap subclass if you pass plain objects (i.e. DefineMap prototypes) in as the viewModel
I'm not saying to do that. I am saying, when you extend a DefineMap, it's good practice to give the extended map a name.
Nico R.
@nriesco
oh, I see you refer to the warning I got, thanks a lot, that shuld definitely make thinks easier to track
Morgan Heimbeck
@Xitstrategies
@justinbmeyer I am just waiting to hear from you on canjs/can-ajax#13 If there is someone who can give me a brief run down or document on what all I need to do to document my pull request change, let me know.
Brad Momberger
@bmomberger-bitovi
It should suffice to add xhrFields as a param to the options object, if you can also link to somewhere that explains the format.
Morgan Heimbeck
@Xitstrategies
@bmomberger-bitovi thanks!
Jim O'Harra-Sutton
@Psykoral
Anyone know the new CanJS 3 version of can/map/delegate? https://v2.canjs.com/docs/can.Map.prototype.delegate.html . I'm trying to do essentially the same thing... Give it a Map to watch, and if this particular property changes, do stuff
Brad Momberger
@bmomberger-bitovi
We were shockingly uncreative about some of these package renames
Jim O'Harra-Sutton
@Psykoral
right, but it says it's deprecated
Brad Momberger
@bmomberger-bitovi
All of can-map is deprecated.
Jim O'Harra-Sutton
@Psykoral
uncreative isn't a bad thing by the way, it is what it says it is :)
right, I guess I'm trying to find "whatever is the new way" to watch a Map value change
Brad Momberger
@bmomberger-bitovi
What you're doing with the changed value matters.
Jim O'Harra-Sutton
@Psykoral
I merely want to listen for it to be changed
Brad Momberger
@bmomberger-bitovi
If it's in another Map, using can-map-define or upgrading to can-define/map/map will let you define a getter that listens to that map's changes.
Jim O'Harra-Sutton
@Psykoral
AH ha, there we go... where would I find info on that right there
specifically listening to the value of an item in another map, exactly
Brad Momberger
@bmomberger-bitovi
For can-define/map/map (this would require some migration work): https://canjs.com/doc/can-define/map/map.html
Jim O'Harra-Sutton
@Psykoral
I am using can-define/map/map yeah
Brad Momberger
@bmomberger-bitovi
If you want to do this outside of a map's property, you can use can-compute instead: https://canjs.com/doc/can-compute.html
The general idea is pretty much the same between a getter on a defined map or a getter-setter in can-compute: Any other compute or property of a can-map or DefineMap that is read by the getter will cause the value to update when it changes.
Jim O'Harra-Sutton
@Psykoral
I want to have one Map A look at a property of a Super Map,and when that value changes do some things in Map A
Brad Momberger
@bmomberger-bitovi
So if you have a DefineMap A, and a DefineMap B (which could be coming from can-connect/super-map)...
And A.foo is a getter that reads the value of B.bar...
And (this is important) A.foo is bound
Then the getter for A.foo is called every time B.bar is updated.