Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
  • 13:17
    ko25july starred canjs/canjs
  • Sep 21 17:41
    cherifGsoul assigned #5508
  • Sep 21 17:39
    cherifGsoul opened #5508
  • Sep 18 19:32
  • Sep 11 02:59
    torongu starred canjs/canjs
  • Sep 09 06:57
    tbreuss starred canjs/canjs
  • Sep 04 18:58
    cherifGsoul review_requested #5507
  • Sep 04 18:58
    cherifGsoul opened #5507
  • Sep 04 18:51

    cherifGsoul on post-release-script

    Add GitHub release automation (compare)

  • Aug 22 17:54
    ThisIsntMyId starred canjs/canjs
  • Aug 21 08:54
  • Aug 20 20:24
    ktitaro starred canjs/canjs
  • Aug 17 16:53
  • Aug 17 16:51
    kuustudio starred canjs/canjs
  • Aug 14 17:12
    cherifGsoul closed #5494
  • Aug 14 17:07
    cherifGsoul labeled #5490
  • Aug 14 17:05
    cherifGsoul labeled #5492
  • Aug 14 17:04
    cherifGsoul closed #5495
  • Aug 14 17:04
    cherifGsoul closed #5498
  • Aug 13 07:25
    kitoki starred canjs/canjs
Frank Lemanschik
this is your code
it adds a destroyList method
that sends the json to a endpoint that does the foreach
Justin Meyer
that's my code?
Frank Lemanschik
Justin Meyer
I generally don't write code like that
Matthew Phillips
it's from that forum post, not sure if you wrote it or @jeroencornelissen did
Frank Lemanschik

@justinbmeyer suggested this on the gitter channel:

I would put a destroyList or some method on your list that makes the requests
and then call destroyedInstance on each one (assuming can-connect)

I have tried that but couldn’t make it work. The items are updated when calling Item.Connection.destroyedInstance(item, {title: 'destroyed'});. The title changes to destroyed, but I expected them to get removed from the list.

See this fiddle 3:

ah ok
it was gregromhild
readed it wrong i tought he copyed your text
Justin Meyer
I remember giving code IN gitter, I wish there was a link to the gitter thread
Frank Lemanschik
if you got gitter pro
you should be able to find it
do you got a pro account?
it has infinity history and search
as far as i remember
Justin Meyer
basically, the .save() on a list would need to update the instances correctly
there's a way to do that
Frank Lemanschik
Justin Meyer
it's not dispatch
(though a dispatch happens)
I'd look it up but in the middle of something
Frank Lemanschik
i saw in some examples that there was custom dispatch on stuff like
can-define backup
thats why i got that idea
Justin Meyer
essentially you would need to re-create what the normal .save() does on every item in the list
Frank Lemanschik
thats correct
it will call some defineMap methods
maybe set ? update somestuff like that
i use that methods when i don't use can connect
to directly update instances
or save maybe as i remember uses the methods
added by can connect
this are the right api's i think to tigger updates
the crud methods
Mike 'mitch' Mitchel
added the .sort method back to can-list 4.2.0
according to your comments @frank-dspeed @justinbmeyer I need to write custom implementation updateListData in order to send one PUT request with list inside of body?
Frank Lemanschik
okey, thanks everyone
Gregg Roemhildt
Hi guys, did logging change in a recnet version of can-stache?
I'm seeing lots of new logs (in a production webpack build).