Where communities thrive


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

    matthewp on master

    Update dist for release (compare)

  • 20:11

    matthewp on v6.2.0

    Update dist for release 6.2.0 (compare)

  • 20:05

    matthewp on master

    Fix bundlesize (compare)

  • 19:22

    matthewp on can-observable-bindings-1.3.0

    (compare)

  • 19:22

    matthewp on master

    fix(package): update can-observ… Set new bundle sizes Merge pull request #5389 from c… (compare)

  • 19:22
    matthewp closed #5389
  • 19:09
    matthewp commented #5389
  • 18:33

    matthewp on can-attribute-observable-2.0.1

    (compare)

  • 18:33

    matthewp on master

    fix(package): update can-attrib… Increase the bundlesize Merge pull request #5394 from c… (compare)

  • 18:33
    matthewp closed #5394
  • 17:59
    matthewp synchronize #5394
  • 17:59

    matthewp on can-attribute-observable-2.0.1

    Increase the bundlesize (compare)

  • 17:42
    matthewp synchronize #5389
  • 17:42

    matthewp on can-observable-bindings-1.3.0

    fix(package): update can-observ… Set new bundle sizes (compare)

  • 17:26
    greenkeeper[bot] labeled #5394
  • 17:26
    greenkeeper[bot] opened #5394
  • 17:26

    greenkeeper[bot] on can-attribute-observable-2.0.1

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

  • 17:15

    matthewp on can-stache-element-1.0.2

    (compare)

  • 17:15

    matthewp on master

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

  • 17:15
    matthewp closed #5387
Nitin Pasumarthy
@Nithanaroy
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');
},
either that or you can trigger directly a function calling a child’s function that is binded to a parent’s function
@kaderiho does safari complain about some sort of security issue or it just won’t work? any feedback in the console?
kostya.aderiho
@kaderiho
So, in parse.js file there is a parseListData method that is not calling in safari, seems that something can't run it exactly in this browser
I'm investigation this, but may be someone saw the same issue
Gregg Roemhildt
@roemhildtg
I've seen that issue in ios
@kaderiho
I also saw it in an older version of IE
I think it had to do with the order of the prototype chain when behaviors get connected. Super hard to diagnose though, I ended up putting the parse stuff as the first object in the array of behaviors.
seemed to fix it
kostya.aderiho
@kaderiho
I've tried to put parse at the first object, but getting Cannot read property 'length' of undefined TypeError: Cannot read property 'length' of undefined now :(
Seems that needs to play with order, may be there is some winning combination for myself :)