Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Oct 18 22:20
    greenkeeper[bot] labeled #5391
  • Oct 18 22:20
    greenkeeper[bot] opened #5391
  • Oct 18 22:20

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

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

  • Oct 18 19:08
    cherifGsoul labeled #5390
  • Oct 18 19:07
    cherifGsoul opened #5390
  • Oct 18 18:45
    greenkeeper[bot] labeled #5389
  • Oct 18 18:45
    greenkeeper[bot] opened #5389
  • Oct 18 18:45

    greenkeeper[bot] on can-observable-bindings-1.3.0

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

  • Oct 18 18:29

    matthewp on master

    Update dist for release (compare)

  • Oct 18 18:29

    matthewp on v6.1.3

    Update dist for release 6.1.3 (compare)

  • Oct 18 17:59

    matthewp on can-observable-array-1.0.2

    (compare)

  • Oct 18 17:59

    matthewp on master

    fix(package): update can-observ… Merge pull request #5388 from c… (compare)

  • Oct 18 17:59
    matthewp closed #5388
  • Oct 18 16:46
    greenkeeper[bot] labeled #5388
  • Oct 18 16:46
    greenkeeper[bot] opened #5388
  • Oct 18 16:46

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

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

  • Oct 18 12:45
    greenkeeper[bot] labeled #5387
  • Oct 18 12:45
    greenkeeper[bot] opened #5387
  • Oct 18 12:45

    greenkeeper[bot] on can-stache-element-1.0.2

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

  • Oct 18 09:49
    chasenlehara edited #5384
Gregg Roemhildt
@roemhildtg
Okay will do
Viktor Busko
@Lighttree
Guys, in what cases this warning appear ? log.js:99 WARN: DefineMap::attr shouldn't be called
Not sure what exactly wrong.
Jeroen Cornelissen
@jeroencornelissen
@Lighttree We get the same message (a lot). I guess it’s something internal.
Kevin Phillips
@phillipskevin
@Lighttree or @Lighttree can one of you put a breakpoint here: https://github.com/canjs/can-define/blob/3e77b3bfbd58cf347f51f57f0b331d95e867558c/list/list.js#L1347 and trace it back to where attr is being called?
Nitin Pasumarthy
@Nithanaroy
We are using can-connect, ^1.3.6. Observed the recent change in model.save() behavior from sending JSON data (to server) to url-encoded format. We are using baseMap() with our models and unable to save due to request data format change. Any ideas on how to change this setting in baseMap?
Runn Vermel
@runn-vermel
+1^
Kevin Phillips
@phillipskevin
what version are you on? we'll investigate why this changed
I think you can change this with the content-type header
something like
url: {
  resource: '/my/api',
  contentType: 'application/json'
}
Nitin Pasumarthy
@Nithanaroy
We are using can-connect, 1.5.7
baseMap({
  "idProp": "id",
  "Map": Report,
  "List": Report.List,
  "url": `/api/v1/report/`,
  "name": "Report",
  "parseListProp": "result",
  "parseInstanceProp": "result"
});
url here?
Kevin Phillips
@phillipskevin
yes
Nitin Pasumarthy
@Nithanaroy
Thats great!
Runn Vermel
@runn-vermel
@phillipskevin ++
Kevin Phillips
@phillipskevin
does that mean it fixed the problem for you?
Nitin Pasumarthy
@Nithanaroy

Worked with fixtures.

With real backend server it did not. The header is Content-Type:application/jsonis correct but the payload is still url-encoded.

Kevin Phillips
@phillipskevin
can you post a screenshot of the headers?
Nitin Pasumarthy
@Nithanaroy
Screen Shot 2017-09-01 at 1.11.48 PM.png
Nitin Pasumarthy
@Nithanaroy
I just observed that even without mentioning the contentType attribute in baseMap.url, the Request header says application/json only
Frank Lemanschik
@frank-dspeed
i always run into problems can some one tell how to use stuff like bootstrap4 wich requires Tether and Popper.js and such modules to work ?
i feel like adding meta tags endless to package.json steal and it don't works :)
i think there should be a way like import Tether from 'tether/dist/tether'
and let that simply work :D
Frank Lemanschik
@frank-dspeed
are there Instructions for binding a file fild?
Nico R.
@nriesco
quick question:
Is there any difference when modifying a viewmodel's property using this two?
this.viewModel.myProperty = 123;
this.viewModel.set('myProperty', 123);
they both seem to work but there might be something I’m missing
@frank-dspeed you mean you need to uplaod a file?
Frank Lemanschik
@frank-dspeed
wanted only to get file infos from the selected files fild
Nico R.
@nriesco
what is “fild”?
Jeroen Cornelissen
@jeroencornelissen
@nriesco with .set you can assign a property on a map that wasn’t predefined.
Nico R.
@nriesco
@jeroencornelissen with not predefined you mean declared? or that didn’t have a value/default-value before?
Jeroen Cornelissen
@jeroencornelissen
prop that wasn’t declared
Nico R.
@nriesco
ok, I see.. thanks! @jeroencornelissen
Szabolcs Schmidt
@sszabolcs

Hi!

I'm using CanJS 3. I would like to call a method on or send event to a child component from a parent component. What is the preferred/recommended way to do this?? Thanks a lot!

Frank Lemanschik
@frank-dspeed
setting a value on parent that is binded to the child component or leaked would be sufficent
Szabolcs Schmidt
@sszabolcs
bind on the change of the value on child side?
Szabolcs Schmidt
@sszabolcs
@frank-dspeed: Do you know why there is not an option for sending events to child components? I'm asking this because there is an easy way to send events from the child to the parent. It's is a little bit strange for me. But there must be a reason why this way is not implemented. Anyway, thank you for the answer!
Nico R.
@nriesco
@sszabolcs why would you need to send an event? you can catch the event in the child and with the binding from child to parent you can trigger something in the parent. You can also bind functions (I’ll search the syntax)
as far as I understand the “correct” way is using bindings
{^@child-funct}=“parentFunct” => https://canjs.com/doc/legacy_%7B($%5E)%7D_bindings.html
not sure how the new syntax would be => https://canjs.com/doc/can-stache-bindings.html
Szabolcs Schmidt
@sszabolcs
@nriesco The situation is the following: there are two components foo and bar. bar is child component in foo. When something happens in foo - a model is modified - bar needs to update its model, too. I would like to send an event to bar to refresh its model. Thanks for the function binding idea. I'll check it!
Nico R.
@nriesco
@sszabolcs usually you’ll set most of the binding behavior in the “inserted” event in the child component. There you’ll have access to its viewmodel via this.viewmodel
Then you can either set a property that is linked (via a binding) to the main compoentn foo
kostya.aderiho
@kaderiho

Hi all, is anyone had a problem with method parseListData in Safari?

I'm calling it in my connection like as:

Priority.connection = connect(
    [realtime, authBehavior, parse, fallThroughCache, constructor, constructorStore, canMap], {
        url: '/pm/v1/priorities',
        Map: Priority,
        List: Priority.List,
        name: 'priority',
        parseListData(response) {
            return { data: response };
        },
        algebra,
        cacheConnection
    });

It works fine for all browsers, but for Safari doesn't work at all

Nico R.
@nriesco
and within the foo component you can listen to a variable’s changes (I haven’t tried that yet) using something like this: (within the event object):
"{viewModel} myVariable": function() {
  console.log('do something when myVariable changes');
},