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)

Kevin Phillips
@phillipskevin
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
i can't bind to a property because of how the data is structured.
so, i just wanna be notified when there's a change, and check for the (hopefully) changed value, and act accordingly
Kevin Phillips
@phillipskevin
  <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>
is that the code you have?
Runn Vermel
@runn-vermel
yup
Kevin Phillips
@phillipskevin
and you're saying that upsertInitialRelease isn't being called?
Runn Vermel
@runn-vermel
it is, but scope.element.value is NEVER changed
Kevin Phillips
@phillipskevin
ok
so... I would first change {($value)} to be only one-way bound
{$value}
so you only have one handler element->viewModel and one handler viewModel->element
right now you have a two-way binding and a one-way binding
Runn Vermel
@runn-vermel
at first we thought perhaps it was a timing issue - but it NEVER changes, and the select doesn't actaully show the new option - it always stays at the empty first option
Kevin Phillips
@phillipskevin
did you try changing it to
          {$value}="trainsByPlatform[platform.name]"
          ($change)="upsertInitialRelease(platform.name, scope.element.value)">
Runn Vermel
@runn-vermel
OMG. that was... simple. of course - doing it 1 way means it can update itself...
Kevin Phillips
@phillipskevin
oh, that was it?
Runn Vermel
@runn-vermel
i'm reloading, just to be sure :)
yes, that was totally it. big sigh of relief
Kevin Phillips
@phillipskevin
ok cool. maybe we should warn if you have multiple of the same binding. I don't know if that would ever be something you want.
Runn Vermel
@runn-vermel
lol.
ok, since i got your attention (your awesome), those warnings are back. i have 100s of them
Kevin Phillips
@phillipskevin
which warnings specifically?
Runn Vermel
@runn-vermel
%index is deprecated. Use scope.index instead.
whoa, that's not it. sorry
can-stache-bindings: the event binding format ($click) is deprecated. Use on:click instead
Kevin Phillips
@phillipskevin
oh, yeah, those are deprecated
(and removed in 4.0, which will be released very soon)
Runn Vermel
@runn-vermel
yeah. so is this app - we are building a now one - i don't want to go through and change things - just turn of the 100s of warnings i'm getting...
Runn Vermel
@runn-vermel
i added this:
import CanLog from "can-log";
CanLog.logLevel = 99;
and i swear that worked for about an hour, and then they came back.
Kevin Phillips
@phillipskevin
hmm
Runn Vermel
@runn-vermel
which... ok? weird.
Kevin Phillips
@phillipskevin
depends where you add that I think
Runn Vermel
@runn-vermel
index.js
at my root
Kevin Phillips
@phillipskevin
ok
Runn Vermel
@runn-vermel
at the end of the imports. should i try at the beginning?
ok, that did nothing.
Kevin Phillips
@phillipskevin
first, I would break in can-log inside of warn
and see if this.logLevel is 99
Runn Vermel
@runn-vermel
how do i do that?
Kevin Phillips
@phillipskevin
in chrome devtools, type cmd+p (or ctrl+p for windows)
type in can-log