Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 14:43
    greenkeeper[bot] closed #5373
  • 14:43

    greenkeeper[bot] on can-deep-observable-1.0.1

    (compare)

  • 14:42

    m-mujica on update-deep-observable

    (compare)

  • 14:42

    m-mujica on master

    Update can-deep-observable to l… Merge pull request #5374 from c… (compare)

  • 14:42
    m-mujica closed #5374
  • 14:42
    m-mujica closed #5365
  • 14:09
    f-ricci starred canjs/canjs
  • 13:55
    greenkeeper[bot] commented #5375
  • 13:55

    greenkeeper[bot] on core-js-3.3.2

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

  • 10:51
    m-mujica review_requested #5374
  • 07:43
    rjgotten commented #5358
  • Oct 13 15:14
    greenkeeper[bot] commented #5375
  • Oct 13 15:14

    greenkeeper[bot] on core-js-3.3.1

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

  • Oct 13 14:49
    greenkeeper[bot] labeled #5375
  • Oct 13 14:49
    greenkeeper[bot] opened #5375
  • Oct 13 14:49

    greenkeeper[bot] on core-js-3.3.0

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

  • Oct 12 18:35
    matthewp commented #5358
  • Oct 12 18:15
    chasenlehara commented #5358
  • Oct 12 06:41

    greenkeeper[bot] on @octokit

    (compare)

  • Oct 12 06:39

    greenkeeper[bot] on @octokit

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

Frank Lemanschik
@frank-dspeed
:D
Frank Lemanschik
@frank-dspeed
@phillipskevin now i am sure i found some real problem :)
i puted a console.log into this -make delegate stuff and let it return ev.target === cur
because i wanted to know why cur.matches is not a function
it turns out ev.target === document.body as html
Frank Lemanschik
@frank-dspeed
also solved :) problem was maybe that my new internel helper caused that via return stache(template)(this); inside a value function from inside a viewModel
it can get ignored its probally a antipattern
Runn Vermel
@runn-vermel
i have a new issue that just popped up: i have a select tag, and i'm running a #each loop inside of it. i'm calling a method on change, and i'm trying to pass the selected element's value. this code has historically worked with %element.value - although, for whatever reason, that's not working now. i tried updating it to scope.element.value, like the warning suggested, but i'm still not getting a value back.
<select class="form-control" {($value)}="trainsByPlatform[platform.name]" ($change)="upsertInitialRelease(platform.name, scope.element.value)"> <option></option> {{#each trains[platform.name] as train}} <option value="{{train.name}}">{{train.name}}</option> {{/each}} </select>
any ideas?
Runn Vermel
@runn-vermel
it seems as the scope.element portion is working, but the value isn't being set on the select when an option is chosen
Morgan Heimbeck
@Xitstrategies
change may trigger before value is set... try putting a timeout in the upsertInitialRelease function?
Runn Vermel
@runn-vermel
hmm, if i do that, i'll still be receiving the value as empty tough.
though*
maybe if i put the timeout in the call with an anonymous function.. let me check
oh, wait, that's a v2 link
argh
Morgan Heimbeck
@Xitstrategies
which version of can are you using?
Runn Vermel
@runn-vermel
3
oh, this isn't react, i can't do an anonymous function on the call.
oy.
Runn Vermel
@runn-vermel
that's not it, though - the selectedIndex doesn't change at all when i select a new option, so it's not a timing issue
Runn Vermel
@runn-vermel
where can i find docs about the ($change) method? i assume an event should be passed when this is called?
Nico R.
@nriesco
@runn-vermel try this:
include outside of the loop (#each) an option tag
{{#if mainModelPromise.isResolved}}
  <select class="form-control" value:bind="selected">
    <option value="">Select an option</option> <!— if I remove this line nothing works —>
    {{#each mainModelPromise.value}}
      <option value="someValue">{{someVar}}</option>
    {{/each}}
  </select>
{{/if}}
in my case it seems to be necessary because it is a two way binding
Frank Lemanschik
@frank-dspeed
@phillipskevin :/ do you know the current state of on:inserted ?
are there new callbacks for can4?
i remember something but find no entry points about that
Kevin Phillips
@phillipskevin
@runn-vermel that is just setting up a https://developer.mozilla.org/en-US/docs/Web/Events/change event
@frank-dspeed https://canjs.github.io/next/doc/migrate-4.html has a section on inserted/removed
there is a new connectedCallback, or you can add back in support for inserted
import "can-3-4-compat/dom-mutation-events";
Gregg Roemhildt
@roemhildtg
Hey guys, I often run into this error:
Potentially unhandled rejection [2] TypeError: Cannot define property _instanceDefinitions, object is not extensible
Finding the cause isn't hard, its usually I forgot to define a property, so I usually just set a console.log breakpoint on the line with the prop name..but I think having some sort of warning for newbies would be really helpful
Kevin Phillips
@phillipskevin
I agree - that warning is really unhelpful
can you open an issue in can-define?
we should be able to give the name of the prop and the name of the DefineMap
Gregg Roemhildt
@roemhildtg
Yep, will do.
Gregg Roemhildt
@roemhildtg
canjs/can-define#309
Gregg Roemhildt
@roemhildtg
Anyone ever created a "batch save" method in can-connect? Instead of model.save(oneItem) saving multiple items in one requestmodel.save([item1, item2, item3]);?
I gotta create about a thousand records in one go...and I think calling .save x1000 would not be pretty
feathersClient accepts an array of data though...so maybe a custom behavior with a special function like saveBatch would be the way to go.
sound about right?
Nico R.
@nriesco
@roemhildtg the Potentially unhandled rejecttion … object is not extensible error occurs when that variable is not defined in the viewmodel
usually happens when you are trying to get a property from the wrong place
Kevin Phillips
@phillipskevin
the problem he is pointing out is that _instanceDefinitions is not the name of the property that is being set
Nico R.
@nriesco
or you just forgot to define it, I think the difficutly is that it only occurs when trying to save or when you don’t load an inital content