Re: [elm-discuss] Re: Edit Table Cell

2016-11-20 Thread Wouter In t Velt
To get decent styling of tables I always use CSS flexbox, as classes for plane and tags. I'm sure there are ways to work too, but for me, they also tend to jump around and behave in unexpected ways. For elm specifically, you could look at devoid/elm-mdl, Or use material design light CSS

Re: [elm-discuss] Re: Edit Table Cell

2016-11-20 Thread Thomas Shelton
Thanks ... I think I understand how it works now. I agree on the editing and using input tags but I haven't been able to come up with easy way to prevent the table from jumping around when I set up the input field. I'll give it a bit more thought. Thanks again for the help. Thomas On Sun,

Re: [elm-discuss] Re: Edit Table Cell

2016-11-20 Thread Wouter In t Velt
Op zondag 20 november 2016 20:17:04 UTC+1 schreef Thomas Shelton: > > I'm not sure onInput will work with TD's though. I'm not seeing any > messages logged in the console. > Yeah, you are right. `onInput` does not fire on TDs. I have changed my example to include your custom `on` handler for

Re: [elm-discuss] Re: Edit Table Cell

2016-11-20 Thread Witold Szczerba
Just my 2 cents: instead of (sometimes) cryptic: type Msg = Input Int Int String one can use something more explicit like: type Msg = Input {row: Int, col:Int, value: String} It depends on the very case though, too verbose does not help either :) Regards, Witold Szczerba On Sun, Nov 20, 2016 at

Re: [elm-discuss] Re: Edit Table Cell

2016-11-20 Thread Thomas Shelton
Thanks for the insights ... I'm not sure onInput will work with TD's though. I'm not seeing any messages logged in the console. I had to create a separate function to parse out the innerHTML and use that as the string. I think this is where my confusion sets in. How can you do that and still

[elm-discuss] Re: Edit Table Cell

2016-11-20 Thread Wouter In t Velt
Your Msg is the type you use to send data back. You actually send it to the Elm runtime. The Elm runtime then sends it to your update function, together with a model. The nice thing is, you can pass more than one parameter in your message. If you define your message as: type Msg = Input Int