Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 13:07
    matthewp opened #5292
  • 13:06

    matthewp on setupguide

    Current static Update setting up canjs The setting up guide (compare)

  • 07:26

    greenkeeper[bot] on webpack-cli-3.3.9

    (compare)

  • 07:18

    greenkeeper[bot] on webpack-cli-3.3.9

    chore(package): update webpack-… (compare)

  • 04:54
    justinbmeyer commented #5290
  • Sep 16 20:45
    matthewp commented #5291
  • Sep 16 20:44
    matthewp synchronize #5291
  • Sep 16 20:44

    matthewp on type8

    Increase bundlesize for core T… (compare)

  • Sep 16 20:30
    matthewp opened #5291
  • Sep 16 20:29

    matthewp on type8

    Upgrade to can-type 1.0.0-pre.8 (compare)

  • Sep 16 20:23
    phillipskevin labeled #5290
  • Sep 16 20:23
    phillipskevin labeled #5290
  • Sep 16 20:23
    phillipskevin opened #5290
  • Sep 16 19:56

    chasenlehara on major

    Bump can-connect version (compare)

  • Sep 16 18:12
    greenkeeper[bot] labeled #5289
  • Sep 16 18:12
    greenkeeper[bot] opened #5289
  • Sep 16 18:11

    greenkeeper[bot] on can-map-4.3.10

    fix(package): update can-map to… (compare)

  • Sep 16 17:51

    chasenlehara on major

    Update dependencies for 5.33.1 Update dist for release Merge branch 'master' into major (compare)

  • Sep 16 17:34

    chasenlehara on master

    Update dist for release (compare)

  • Sep 16 17:34

    chasenlehara on v5.33.1

    Update dist for release 5.33.1 (compare)

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?
oh
Chris Gomez
@akagomez
If the list of options is rebuilt with the same values the selected element is not shown as selected.
Justin Meyer
@justinbmeyer
it works for me
Chris Gomez
@akagomez
Really? Browser?