[elm-discuss] Re: Looking for people experienced with elm-html's "key" function

2016-05-24 Thread Kris Jenkins
I've just run into this too, but for me it causes a runtime exception. I've added a demo to reproduce (based on Gera's code) to the same issue: https://github.com/elm-lang/html/issues/21 On Monday, 23 May 2016 13:41:56 UTC+1, ge...@theoldmonk.net wrote: > > I'm not sure if the lazyDict approac

[elm-discuss] Re: Looking for people experienced with elm-html's "key" function

2016-05-23 Thread gera
I'm not sure if the lazyDict approach applies, but I'm hitting a much simpler (IMO) issue that I've reported at https://github.com/elm-lang/html/issues/21. I'm honestly surprised that no one has run into it yet, specially since the documentation for `key` in 0.16 specifically provides this exac

[elm-discuss] Re: Looking for people experienced with elm-html's "key" function

2016-05-21 Thread flip101
Here are two examples were key is needed https://langrisa.eu/virtual-dom-pitfalls/ . I don't understand the new lazy proposal so i can't judge if it would work well in these cases. Why can't the compiler just infer where this is needed? Thinking about key is a HARD problem for your brain. Evan

[elm-discuss] Re: Looking for people experienced with elm-html's "key" function

2016-05-21 Thread flip101
Here are two examples were key is needed https://langrisa.eu/virtual-dom-pitfalls/ . I don't understand the new lazy proposal so i can't judge if it would work well in these cases. Why can't the compiler just infer where this is needed? Thinking about key is a HARD problem for your brain. On M

[elm-discuss] Re: Looking for people experienced with elm-html's "key" function

2016-05-20 Thread Sylvain Falardeau
On Wednesday, May 18, 2016 at 12:24:17 PM UTC-4, debois wrote: > > I was using virtualdom key for two things, both of which I cannot do in > 0.17. > > 1. Instructing virtual-dom whether or not to reset scrolling-state of an > element. Try it out here: https://debois.github.io/elm-mdl/: Scroll t

Re: [elm-discuss] Re: Looking for people experienced with elm-html's "key" function

2016-05-19 Thread Mark Hamburg
Some members of my team just raised the concern that not providing for item identity could cause focused text fields to lose focus and a bunch of edit state. I said I would pass it on. > On May 18, 2016, at 9:24 AM, debois wrote: > > I was using virtualdom key for two things, both of which I c

[elm-discuss] Re: Looking for people experienced with elm-html's "key" function

2016-05-18 Thread debois
I was using virtualdom key for two things, both of which I cannot do in 0.17. 1. Instructing virtual-dom whether or not to reset scrolling-state of an element. Try it out here: https://debois.github.io/elm-mdl/: Scroll to the bottom, then switch tab. Because virtual-dom is re-using the div cont