Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Dec 14 20:01
    greenkeeper[bot] labeled #5450
  • Dec 14 20:01
    greenkeeper[bot] opened #5450
  • Dec 14 20:00

    greenkeeper[bot] on semver-7.0.0

    chore(package): update semver t… (compare)

  • Dec 14 16:58
    millette starred canjs/canjs
  • Dec 14 00:14
    greenkeeper[bot] labeled #5449
  • Dec 14 00:14
    greenkeeper[bot] opened #5449
  • Dec 14 00:14

    greenkeeper[bot] on can-super-model-2.0.0

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

  • Dec 14 00:13
    greenkeeper[bot] labeled #5448
  • Dec 14 00:13
    greenkeeper[bot] opened #5448
  • Dec 14 00:13

    greenkeeper[bot] on can-define-rest-model-2.0.0

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

  • Dec 14 00:12
    greenkeeper[bot] labeled #5447
  • Dec 14 00:12
    greenkeeper[bot] opened #5447
  • Dec 14 00:12

    greenkeeper[bot] on can-define-realtime-rest-model-2.0.0

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

  • Dec 14 00:07
    greenkeeper[bot] labeled #5446
  • Dec 14 00:07
    greenkeeper[bot] opened #5446
  • Dec 14 00:07

    greenkeeper[bot] on can-connect-ndjson-2.0.0

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

  • Dec 13 21:27

    greenkeeper[bot] on @octokit

    (compare)

  • Dec 13 21:25

    greenkeeper[bot] on @octokit

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

  • Dec 13 21:21

    greenkeeper[bot] on @octokit

    (compare)

  • Dec 13 21:20

    greenkeeper[bot] on @octokit

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

Frank Lemanschik
@frank-dspeed
then you do getList and post that json to that endpoint
your done
the endpoint then takes that json list and does the for each serverside
I think that's the forum post @justinbmeyer is talking about
the linked to jsbin shows an example that does bulk deletes
Frank Lemanschik
@frank-dspeed
ya the question now is do you want to do bulk on the interface aka from the client side
or from the backend aka batch bulk enabled api endpoint
Justin Meyer
@justinbmeyer
@jeroencornelissen I think I shared some code too
Frank Lemanschik
@frank-dspeed
this is your code
it adds a destroyList method
that sends the json to a endpoint that does the foreach
:D
Justin Meyer
@justinbmeyer
that's my code?
Frank Lemanschik
@frank-dspeed
yes
Justin Meyer
@justinbmeyer
I generally don't write code like that
Matthew Phillips
@matthewp
it's from that forum post, not sure if you wrote it or @jeroencornelissen did
Frank Lemanschik
@frank-dspeed

@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
sorry
:D
readed it wrong i tought he copyed your text
Justin Meyer
@justinbmeyer
I remember giving code IN gitter, I wish there was a link to the gitter thread
Frank Lemanschik
@frank-dspeed
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
@justinbmeyer
basically, the .save() on a list would need to update the instances correctly
there's a way to do that
Frank Lemanschik
@frank-dspeed
dispatch
Justin Meyer
@justinbmeyer
it's not dispatch
(though a dispatch happens)
I'd look it up but in the middle of something
Frank Lemanschik
@frank-dspeed
i saw in some examples that there was custom dispatch on stuff like
can-define backup
thats why i got that idea
Justin Meyer
@justinbmeyer
essentially you would need to re-create what the normal .save() does on every item in the list
Frank Lemanschik
@frank-dspeed
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
!