Button types - #17
Conversation
| uiButton | ||
| :: MonadWidget t m | ||
| => Dynamic t UiButton | ||
| => UiButtonType |
There was a problem hiding this comment.
Instead of changing this type signature, can you put UiButtonType inside the UiButton type instead?
There was a problem hiding this comment.
I thought of that but it seems very odd to change the type of a button dynamically.
There was a problem hiding this comment.
True. Then I think if we're making a breaking change we should go for a more general one:
uiButton :: MonadWidget t m => UiButtonStatic -> Dynamic t UiButton ...
...and make UiButtonType be a field of UiButtonStatic.
There was a problem hiding this comment.
I'm cool with that. I could also add new functions like uiButtonWith and have uiButton et. al. default to the most common use-case (in Reflex apps that is).
|
Sorry, I still plan to do this but my project is hightailing it to production so I have little time for OSS contributions ATM. |
Buttons are submits by default which is a very odd thing indeed in a Reflex app.