Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Nov 14 17:40
    nlundquist edited #5424
  • Nov 14 17:40
    nlundquist edited #5424
  • Nov 14 17:39
    nlundquist opened #5424
  • Nov 14 17:39
    nlundquist review_requested #5424
  • Nov 14 17:39

    nlundquist on 107-update-converter-demos

    update can-stache-converters de… (compare)

  • Nov 14 14:32
    greenkeeper[bot] labeled #5423
  • Nov 14 14:32
    greenkeeper[bot] opened #5423
  • Nov 14 14:32

    greenkeeper[bot] on can-route-5.0.1

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

  • Nov 13 13:09

    greenkeeper[bot] on steal-tools-2.2.3

    (compare)

  • Nov 13 12:55

    greenkeeper[bot] on steal-tools-2.2.3

    chore(package): update steal-to… (compare)

  • Nov 13 01:44

    greenkeeper[bot] on @webcomponents

    (compare)

  • Nov 13 01:42

    greenkeeper[bot] on @webcomponents

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

  • Nov 12 05:28
    greenkeeper[bot] commented #5392
  • Nov 12 05:28

    greenkeeper[bot] on core-js-3.4.1

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

  • Nov 11 18:03
    greenkeeper[bot] labeled #5422
  • Nov 11 18:03
    greenkeeper[bot] opened #5422
  • Nov 11 18:03

    greenkeeper[bot] on @feathersjs

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

  • Nov 11 18:02
    greenkeeper[bot] commented #5401
  • Nov 11 18:02

    greenkeeper[bot] on @feathersjs

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

  • Nov 10 23:39

    greenkeeper[bot] on @octokit

    (compare)

Mohamed Cherif Bouchelaghem
@cherifGsoul
@jeroencornelissen look at Tabs example you follow the same pattern to make it works https://canjs.com/docs/can.Component.html
Christopher Oliphant
@RALifeCoach
playerRow is being updated during the stache parsing and populating
Kevin Phillips
@phillipskevin
ok
you’re not expecting that?
Christopher Oliphant
@RALifeCoach
No
Kevin Phillips
@phillipskevin
how is playerRow defined?
Christopher Oliphant
@RALifeCoach
data = { playerRow: { …} }; var map = new mapBase(data);
This message was deleted
that is then inserted into the compoent
var template = can.stache('<player-row id="player-row-' + this.pid + '"></player-row>');
this.container.append(template(map));
Christopher Oliphant
@RALifeCoach
one point - I begin my stache file with {{#with playerRow}} so that I don’t have to qualify all the references to properties within playerRow
Kevin Phillips
@phillipskevin
does mapBase have a playerRow property?
Christopher Oliphant
@RALifeCoach
@phillipskevin when I remove the {{#with playerRow}} everything works
well, most things work
Kevin Phillips
@phillipskevin
ok, I’m not sure why that would be
if you’re able to reproduce the issue in a jsbin I can take a look
Julian
@pYr0x
@jeroencornelissen i thought that your question i have seen once. http://forums.donejs.com/t/modifying-view-after-rendering-finishes/52 I posted a possible solution. Maybe you have to restructure your code.
Jeroen Cornelissen
@jeroencornelissen
:point_up: 22 maart 2016 17:27
@cherifGsoul @pYr0x Do you mean something like this: http://jsbin.com/tuciqivuxi/1/edit?html,js,output
Look at the clicky function. It feels kind of wrong removing the component and inserting it again. I think the power of CanJS is the live binding, change one property and my app rerenders automaticilly.
Jeroen Cornelissen
@jeroencornelissen
@dbleier @pYr0x I added a reply to the existing forum topic:
http://forums.donejs.com/t/modifying-view-after-rendering-finishes/52/3
Julian
@pYr0x
@jeroencornelissen my jsbin example didnt help you?
and check on the my-input inserted event
is this also fired only once?
Jeroen Cornelissen
@jeroencornelissen
@pYr0x this could work, I already have a component for each input type so I could provide a focus attr from the backend.
I console log the inserted event and that gets triggered every time so this could work :+1:
Julian
@pYr0x
other option is to use autofocus
Jeroen Cornelissen
@jeroencornelissen
@pYr0x autofocus only seems to werk first time, not when switching between forms.
With the extra focus attribute I can make it work! :clap:
Julian
@pYr0x
good.. if you can add your working example to the forum, would be nice
or provide a solution
Mohamed Cherif Bouchelaghem
@cherifGsoul
@jeroencornelissen thank you for submiting it in donejs forums
This message was deleted
Christopher Oliphant
@RALifeCoach
in the docs it recommends including css files with components
how best to do that?
is there some way of bringing the file into the component?
Guido Smeets
@gsmeets
Depending on how much css you have I wouldn't bother
Julian
@pYr0x
dont understand the question...
Christopher Oliphant
@RALifeCoach
there is a property on component for template, it would be nice to have a property for css - that could be a css, less or sass string or file
Julian
@pYr0x
what do you mean with property?
Christopher Oliphant
@RALifeCoach
can.Component.extend({
tag: ‘tag-name’
*template*: can.view(’path to stache file’)
wwould tag and template not be properties of the component?
Julian
@pYr0x
include css or less import 'path/to/style.css';
Christopher Oliphant
@RALifeCoach
except this project does not use steal
Julian
@pYr0x
or require();
tried <can-import>?
in the template
Christopher Oliphant
@RALifeCoach
interesting suggestion, can I use it to import a script as well?
Julian
@pYr0x
i think so
try it