Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 20:45

    greenkeeper[bot] on @octokit

    (compare)

  • 20:43

    greenkeeper[bot] on @octokit

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

  • 19:54

    m-mujica on master

    Update dist for release (compare)

  • 19:54

    m-mujica on v6.2.1

    Update dist for release 6.2.1 (compare)

  • 19:43
    greenkeeper[bot] closed #5396
  • 19:43

    greenkeeper[bot] on can-observable-mixin-1.0.4

    (compare)

  • 19:43
    greenkeeper[bot] closed #5395
  • 19:43

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

    (compare)

  • 19:43

    m-mujica on update

    (compare)

  • 19:43

    m-mujica on master

    Update packages to the latest v… Fix bundlesize Merge pull request #5398 from c… (compare)

  • 19:43
    m-mujica closed #5398
  • 18:57
    m-mujica synchronize #5398
  • 18:57

    m-mujica on update

    Fix bundlesize (compare)

  • 18:43
    cherifGsoul commented #5397
  • 18:39
    matthewp commented #5397
  • 18:26
    m-mujica opened #5398
  • 18:25

    m-mujica on update

    Update packages to the latest v… (compare)

  • 18:19
    cherifGsoul assigned #5397
  • 18:19
    cherifGsoul opened #5397
  • 18:13
    greenkeeper[bot] labeled #5396
Runn Vermel
@runn-vermel
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
Oh, I see
Gregg Roemhildt
@roemhildtg
Hey, calling a definMap.get should return all its properties, right? Even if serialize:false is set on a property?
Or does serialize: false affect .get() as well as .serialize()?
Kevin Phillips
@phillipskevin
get also just returns enumerable properties
Runn Vermel
@runn-vermel
@phillipskevin - the problem is that i can't data bind it - long story. there's something that's preventing the select from knwoing there's been a change in the option selected. i know (vaguely) that canJs has something that adds a value property to a select - but that doesn't seem to get updated. it knows there's a change, but the value on the select doesn't change, so i was hoping that maybe there's a way to access the change event that is generated with the ($change) function call
Gregg Roemhildt
@roemhildtg
Okay gotcha.
Kevin Phillips
@phillipskevin
<select> has value without CanJS
Runn Vermel
@runn-vermel
@phillipskevin i humbly disagree: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/select - it has selectedIndex but no value.
that's why I tried it in the JSBin... because it wasn't readily available on the docs you pointed out
it's in the DOM Interface link though
Runn Vermel
@runn-vermel
ha - thanks MDN. 2 docs for the same thing with different attributes on them. either way, value isn't being updated when i make a new selection... any ideas?
Kevin Phillips
@phillipskevin
the value isn't? or the property you're binding it to isn't?
Runn Vermel
@runn-vermel
the value isn't