Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 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)

  • Nov 10 23:37

    greenkeeper[bot] on @octokit

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

  • Nov 08 16:08
    greenkeeper[bot] labeled #5421
  • Nov 08 16:08
    greenkeeper[bot] opened #5421
  • Nov 08 16:08

    greenkeeper[bot] on can-stache-bindings-5.0.2

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

  • Nov 07 17:31

    cherifGsoul on 6-2-5-version

    (compare)

  • Nov 07 17:31
    cherifGsoul closed #5420
  • Nov 07 17:30

    cherifGsoul on master

    Update dist for release (compare)

  • Nov 07 17:28
    cherifGsoul edited as member
  • Nov 07 17:27
    cherifGsoul added as member
  • Nov 07 17:17
    cherifGsoul opened #5420
  • Nov 07 17:17

    cherifGsoul on 6-2-5-version

    Bump Version I don't have push… (compare)

  • Nov 07 17:09

    cherifGsoul on v6.2.5

    Update dist for release 6.2.5 (compare)

  • Nov 07 16:49

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

    (compare)

  • Nov 07 16:49

    phillipskevin on can-observable-mixin-1.0.6

    (compare)

Matthew Phillips
@matthewp
it's used by done-autorender
so if you're not using that, no it does not
Thomas Sieverding
@Bajix
I see
Matthew Phillips
@matthewp
by the way, angular 2 has essentially the same sort of thing.
Thomas Sieverding
@Bajix
Feels dirty ;x
Matthew Phillips
@matthewp
for their ssr solution
Thomas Sieverding
@Bajix
But I suppose that’s acceptable for SSR
Matthew Phillips
@matthewp
It only applies to the initial render
once the page is loaded our overrides are gone
I like it because it leads to more elegant user code
you can do new XMLHttpRequest() and we'll know to wait for that
or return User.getList() and we know about it
Thomas Sieverding
@Bajix
Will done-autorender work w/ precompiled stache templates
Matthew Phillips
@matthewp
what is a precompiled stache template?
I think the answer is yes because i don't know what that is :)
done-autorender is like the stache/system plugin but applies to the main template only
so if you know a little about stache/system it's similar in what it does
but it also inserts the rendered fragment into the page for you
Thomas Sieverding
@Bajix
define([
  "module",
  "can/view/stache/stache",
  "can/view/stache/mustache_core"
],function(module, stache, mustacheCore){
    var renderer = stache([{"tokenType":"start","args":["p",false]},{"tokenType":"end","args":["p",false]},{"tokenType":"chars","args":["I'm a little tea pot"]},{"tokenType":"close","args":["p"]},{"tokenType":"done","args":[]}]);
    can.view.preload("test_stache", renderer);
    return function(scope, options, nodeList){
        var moduleOptions = { module: module };
        if(!(options instanceof mustacheCore.Options)) {
            options = new mustacheCore.Options(options || {});
        }
        return renderer(scope, options.add(moduleOptions), nodeList);
    };
});
If I wanted to use done-autorender w/ something like that
My builds do *.stache -> .stache.js, and utilize configuration so that I don’t need the !plugin syntax
If I were to be using done-autorender, I would be loading the pre-compiled stache JS file
Thomas Sieverding
@Bajix
done-autorender seems problematic because it’s dependent on doing an ad-hoc stache translation
Not to mention the coupling w/ live-reload ;(
Mason Shin
@minsooshin
is there a way that i can fire the ($click) event on the dom element?
in the component?
Kevin Phillips
@phillipskevin
you mean trigger a click programatically?
Mason Shin
@minsooshin
<td class="sa-expand-row" ($click)="toggleNestedContent(../../..)">
I have a stache file like this
but I would like to remove the click event listener from the component
Kevin Phillips
@phillipskevin
ok
you just don’t want it in the template?
Mason Shin
@minsooshin
events: {
  'tbody.sc-disabled td click’: function(el, ev): {
    …
  }
}
I am trying to do something like this
in the component
Kevin Phillips
@phillipskevin
ok
Mason Shin
@minsooshin
I wat to keep that event
but also want to fire the event for some cases
Thomas Sieverding
@Bajix
You can pass events / the el
Mason Shin
@minsooshin
more details are, that table is separate component I am using from another component
Kevin Phillips
@phillipskevin
but also want to fire the event for some cases
Thomas Sieverding
@Bajix
{toggleNestedContent} will be called w/ el, ev by default i believe
Kevin Phillips
@phillipskevin
not sure what you mean by that
Thomas Sieverding
@Bajix
You can also do ($click)=“toggleNestedContent($element, @event)"
Mason Shin
@minsooshin
export default can.Component.extend({
  tag: 'sc-table',
  template: template,
  viewModel: ViewModel,
  helpers: {
    getColspan: function(options) {
      return this.attr('checkable') ?
        this.headerColumns().length + 1 :
        this.headerColumns().length;
    }
  }
});
I am defining table component like this
and this table domponent has the click event on the dom
export default can.Component.extend({
  tag: 'sc-grid',
  template: template,
  viewModel: viewModel,
  helpers: {
    showPaginationOnTop: function() {
      return this.paginationPosition === 'top';
    },

    showPaginationOnBottom: function() {
      return this.paginationPosition === 'bottom';
    }
  },

  events: {
   'tbody.sc-disabled td click': function(el, ev) {
      can.event.unbind.call(el, 'click', () => {
        console.log(this);
      });
      ev.preventDefault();
      ev.stopPropagation();
    }
  }
}
I am using that table component from this grid component