Question: a custom "on" ?

Asked By
Asked At
2017-11-28 15:34:03

Found 15 possible answers.

User Answered At Possible Answer
ivanschuetz 2017-11-28 16:39:45 ah, ok. I decided anyway to just support a previous and next buttons, a fling gesture actually isn't suitable for a pager (as discussed in the beginners channel) thanks
lfr1138 2017-11-28 16:57:34 Looks like the elm-container element in my app has no height/width specified, though it is now specified on the body. I guess I need to add a div for that in the app.css to set it to height: 100% and hopefully that should work. -- I'll keep you posted I think this needs some documentation to point folks in the right direction. I may try to write up a post on this for the Elixir/Phoenix folks that are adapting that environment to use Elm , once I get this update rolled out. That did the trick! Thanks sooooooo much for your patience and assistance!!!
cjduncana 2017-11-28 19:27:48 @augustin82 Yeah, you can create your own event handler where you decides what event to listen to and how to message Elm when an event happens.
danield9tqh 2017-11-28 19:36:07 I've just started testing out style elements and I noticed some behavior with Element.Input.text that I wasn't sure was expected or not. The value of the text field does not seem to update when the model updates. Is that expected behavior?
cjduncana 2017-11-28 19:38:28 I totally forgot to mention that @danield9tqh @mgriffith The value key in the checkbox record is tied to Html.Attributes.defaultValue instead of Html.Attributes.value .
danield9tqh 2017-11-28 19:41:53 @cjduncana is that the same for text input as well?
cjduncana 2017-11-28 19:42:14 So when one wants to update the input box with what is in our model we have to reach out to Html.Attributes.value >> Attrs.toAttr . I just corrected it. I meant input :sweat_smile:
danield9tqh 2017-11-28 19:42:50 oh yea thanks! Could you point me to where in the code that distinction is made between the defaultValue and value . I assumed that was the case and was poking around the style-elements github to see if I could find where that was specified but I never found it
cjduncana 2017-11-28 19:46:59 This is where the value key in the record is used: Here’s the definition of the function that uses defaultValue to convert the input.value :
danield9tqh 2017-11-28 19:48:03 Ah yes, and here specifies default value Thanks!
cjduncana 2017-11-28 19:48:24 No problem
danield9tqh 2017-11-28 19:50:33 Are you an elm contributor? Had some other questions regarding defaultValue vs value of text field but don't want to take too much of your time :slightly_smiling_face:
eliaslfox 2017-11-28 19:51:24 Are there plants to, or has there been a discussion around adding
cjduncana 2017-11-28 19:52:51 I’m just a dude that write code. Today is a national holiday in my country so I’m chilling today :grin:
danield9tqh 2017-11-28 19:55:21 oh nice, yea I see you write code from your slack status haha. Anyway I'll throw out the question and you can answer if you want. Why is there even a distinction for input fields between defaultValue and value . I know that both have different meaning in Html but when dealing with a virtual DOM it seems it makes sense to only have one 'value' and that is what is displayed in the text box on the screen. And that the value would just have to come straight from the model. Just not sure if there's a reason why Elm still has both attributes

Related Questions