Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Sep 20 21:04
    m-mujica commented #5303
  • Sep 20 20:23
    m-mujica opened #5303
  • Sep 20 20:23

    m-mujica on upgrade-deps

    Update can-type and can-stache-… (compare)

  • Sep 20 20:05
    m-mujica edited #5302
  • Sep 20 20:03
    m-mujica synchronize #5302
  • Sep 20 20:03

    m-mujica on upgrade

    Upgrade routing guide to Can 6 Fix incorrect highlight Use svg images (instead of .png) (compare)

  • Sep 20 19:32
    m-mujica opened #5302
  • Sep 20 19:29

    m-mujica on upgrade

    Upgrade routing guide to Can 6 Fix incorrect highlight (compare)

  • Sep 20 17:42

    m-mujica on upgrade

    WIP: Upgrade (compare)

  • Sep 20 17:06
    do-adams starred canjs/canjs
  • Sep 20 13:34

    chasenlehara on 5119-testing-guide

    Update the Testing guide for Ca… (compare)

  • Sep 20 13:21
    cherifGsoul commented #5295
  • Sep 20 13:18
    cherifGsoul synchronize #5295
  • Sep 20 13:18

    cherifGsoul on update-theme-new-buttons

    Theme pre-release 2 (compare)

  • Sep 20 10:29

    greenkeeper[bot] on socket.io-client-2.3.0

    (compare)

  • Sep 20 10:26

    greenkeeper[bot] on socket.io-client-2.3.0

    chore(package): update socket.i… (compare)

  • Sep 20 06:40
    HellMagic starred canjs/canjs
  • Sep 19 20:42
    m-mujica commented #5119
  • Sep 19 18:40
    phillipskevin closed #5300
  • Sep 19 18:40
    phillipskevin commented #5300
Chris Gomez
@akagomez
Neat.
Jani Mikkonen
@rasjani
so, major question is, why are trailing whitespaces still allowed ? =))
Chris Gomez
@akagomez
Couldn’t tell you. Never asked.
blairio
@blairio
Hello CanJS folks, I was wondering if anyone is familiar with a can component or other Javascript UI thing that can bind a can.list but only renders the items that are visible as they scroll.
Justin Meyer
@justinbmeyer
@blairio @cklanac was working on this
blairio
@blairio
@cklanac I would be interested to learn where you have gotten with this. It seems like a popular pattern on native platforms (Eg. iOS UITableViewController and Android RecyclerView)
Chris Klanac
@cklanac
@blairio I'll put together a jsBin that shows the relevant bits… stay tuned
blairio
@blairio
Thanks @cklanac
blairio
@blairio
Does anybody know if there is a quick way on the console to find out how many live bindings there are on a page at a given moment? Thanks.
Chris Klanac
@cklanac
Basically loops over all the list items that haven’t been fetched yet. It checks each item to see if it is within the viewport. If it is, then it sets a value on the ViewModel which you can use to fetch data or whatever.
blairio
@blairio
Cool. Thanks @cklanac I will look at it soon
Chris Klanac
@cklanac
I also short circuit the loop once we get to the first item past the viewport which should help performance a bit on really large lists.
dylanrtt
@dylanrtt
are stache partials supposed to completely re-render when the parent scope changes?
Juan Orozco
@Macrofig
Is there an example where someone has specified the Map to use in a List but X levels deep? So, that myList.attr(0).items.attr(0) instanceof MyCustomMap?
Right now, only the first level uses the custom Map and I need it to apply to all maps in the List.
Matthew Phillips
@matthewp
i don't follow what you're attempting to do
Nikolay Nadorichev
@Luanre
@Macrofig are you tried to pass all of your data to constructor of MyCustomMap ?
Juan Orozco
@Macrofig
Here's an example @ccummings helped build. http://jsbin.com/zuteha/edit?js,output
The last check is returning false. I need every map, at any level to be an instance of the custom map.
@Luanre I tried using can.Map instead of a can.List and that worked fine. My understanding, though, is this method is better.
Another consideration is that I each item in the list needs to report it's index within the list dynamically, i.e. the order of items can change at any time and the index needs to be up to date.
dylanrtt
@dylanrtt
Has anyone figured out how to make dynamic select menus work with can-value? It seems that when the source/filter of the list changes, the displayed selected value always changes to the first item which may not be correct. http://jsbin.com/fedixolaru/1/edit?html,js,output
Luis Merino
@Rendez
Hi, I saw that for 2.3.0 there was a plan to improve cross-component communication, does anyone know what's the status on that. For me it's a crucial factor that's keeping me from using canjs in my current company
Chris Gomez
@akagomez
@Rendez I think that progress has been logged here: bitovi/canjs#1700
Chris Gomez
@akagomez
Using <can-import> for the first time. So glad to finally have a solution in place for template dependencies.
Worked like a charm.
Justin Meyer
@justinbmeyer
@Rendez what type of cross-component communication?
Justin Meyer
@justinbmeyer
@dylanrtt that's probably something we should fix
@akagomez maybe I didn't read the example fully
but this to me seems a problem with not keeping the value and options in sync
this might be something can.view.live needs a special case to fix
@dylanrtt can you create an issue?
someone can take a look at this
dylanrtt
@dylanrtt
sure
Justin Meyer
@justinbmeyer
just to make sure I see what the problem is ... basically if <option>s are added / removed from the DOM, the selected one is not currently maintained?
just saw your issue ... if you could provide a bit of text around the bug, that would be helpful
(issues that people have to "dive into" to have an idea about what's breaking are fixed a bit slower then ones where it's more immediately obvious)
thanks!
I wonder if this is a problem with normal live-binding
as much as it is w/ two way binding
Chris Gomez
@akagomez
@justinbmeyer Yeah, I read it wrong. I think you’ve got it.
So as new <option>’s are rendered as children of a <select> element they should check their value against the can-value property of the parent <select>?
And add selected to the <option> element.
@justinbmeyer You mean if I rebuild the list of <option> tags with JS in general, will the selected option be marked selected?
Justin Meyer
@justinbmeyer
I don't think it will
I'm not sure
but it should be
Chris Gomez
@akagomez
@justinbmeyer Doesn’t look like it: http://jsbin.com/bazavuxiro/edit?html,js,output
Justin Meyer
@justinbmeyer
what is that supposed to show?