Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 17:32
    mateus007 starred canjs/canjs
  • 16:12
    gregmartin06 starred canjs/canjs
  • 11:45
    alex-zhang starred canjs/canjs
  • 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
deepasrikanth
@deepasrikanth
now on one tab I save new data and another tab I try to visit the list page and I don't see the new data. The API request does not show the new data as well. but If I go back by browser back or another way and come back to the list page... the api request shows new data. So I doubted the caching.
Kevin Phillips
@phillipskevin
hmm, ok
it’s hard to say what’s happening
any way you can try to reproduce it in a jsbin?
deepasrikanth
@deepasrikanth
I can try. I have not used it so far.
Kevin Phillips
@phillipskevin
there is a link at the top of gitter that you can use to get started
deepasrikanth
@deepasrikanth
So this code works if I use fixtures.. but this problem happens when I really hit the APIs that talk to my local mongo
If I copy the code in jsBin you won't be able to see the problem by running it but you can see the code I guess
Morgan Heimbeck
@Xitstrategies
try doing this in your ViewModel instead of in the init
"eventGroups": {
    get: function() {
      return EventGroup.getList({});
    }
  },
deepasrikanth
@deepasrikanth
will try that. I just tried this in my model definition "cacheConnection": "real-time",
seems to be working. is that a valid configuration?
deepasrikanth
@deepasrikanth
never mind my last question
deepasrikanth
@deepasrikanth
Thank you guys. changing super map to base map worked.
Gira Minus
@gKreator
@phillipskevin Thanks I figured it out that night I forgot to mention it.
Is there any good way to prompt somebody to save a form as they are trying to navigate away? Let's say they filled out a form and forgot to save. Is there a decent way to prevent route change or force them back or something?
I know if they close the web browser you can do the js onbeforeunload event
Frank Lemanschik
@frank-dspeed
@gKreator you can let the on route change event block if form is filled partial
i don't remember exactly where it is as i don't use routing from canJs any more
i found out via benchmarks that my server side handels packaging and caching and all that more efficent so i only use viewModel + component
https://v2.canjs.com/docs/can.route.html#section_Changingtheroute_ here if your using v2 read using route with can.control
here search for listen to event changes
if your using v3
:d
i made animated gifs from donejs meetings ;)
this are my both favorit chason lauthing and justin saying every thing is possible :)
Matthew Phillips
@matthewp
:smile:
Justin Meyer
@justinbmeyer
haha
Chasen Le Hara
@chasenlehara
lol
Frank Lemanschik
@frank-dspeed
I tought its a EPIC :)
its useable for github and that
it could also be used realy informativ to show parts from demos or live talks on youtube but i used it for that
Kyle Gifford
@kylegifford
Is the shorthand for can-component events still around? As in,
'{viewModel} thingThatChanged': 'methodToCall'
and is methodToCall on the viewModel, or a method on the events object?
Kevin Phillips
@phillipskevin
yes, that still works
I think it has to be a method on the events object
it definitely works that way: http://jsbin.com/xahuzeyabi/edit?js,output
yeah, has to be on the events object
Kevin Phillips
@phillipskevin
component doesn’t do anything special to let you use the viewModel
Kyle Gifford
@kylegifford
thanks
Nils Lundquist
@nlundquist

hey all, I've got an issue with 2.3 that I'm wondering if anyone is familiar with:

trying to pass a function from a parent component to a child with a binding like {on-my-event}="@eventHandler" but since the child component is using a can.Map with a define, eventHandler is set as the define value property for onMyEvent and any define value function prop is called as if it's a value defaulter function. see the code around: https://github.com/canjs/canjs/blob/2.3-legacy/map/define/define.js#L45

only solution i can come up with is to pass the child component a function that returns the function i actually want to use as the value of the prop, but that seems like a pretty sad hack for something so simple.
Nils Lundquist
@nlundquist
def not intuitive to require a parent component to pass a child component wrapped functions to prevent this from happening
Justin Meyer
@justinbmeyer
@nlundquist if you want a default property value that is a function, the only way is to create a function that returns a function
but I'm not sure I understand you right
what you linked to only deals with maps ... seems like there's something around view bindings
Nils Lundquist
@nlundquist

hey Justin. I don't need a default value. I'm fine with the default property requiring a function to return a function since that's all in the view model config of the child. What I'm trying to do is pass a function from a parent component to a child component, and use that function within the child component logic.

Right now, whenever I pass a component from the parent component to the child component, the child component calls that function during it's a initialization because it thinks that function is a 'defaulter()' value like mentioned in the docs here: https://v2.canjs.com/docs/can.Map.prototype.define.value.html

I don't think there is an issue with the view bindings since the function is successfully passed from the parent component to child. The function is set on the child VM, in my example case, as the value on the onMyEvent property of the VM.

I just don't want that passed value to be called during child component VM initialization. The map/define/define.js code I linked to is where this function is added to the set of Map.defaultGenerators