digitallyinduced / ihp

🔥 The fastest way to build type safe web apps. IHP is a new batteries-included web framework optimized for longterm productivity and programmer happiness
https://ihp.digitallyinduced.com/
MIT License
4.92k stars 195 forks source link

`textareaField` not working as expected #1246

Closed mpscholten closed 2 years ago

mpscholten commented 2 years ago

After the recent changes to the IHP Forms, the textareaField helper doesn't render a <textarea> anymore. Instead a <input> is generated.

mpscholten commented 2 years ago

cc @amitaibu

amitaibu commented 2 years ago

Looking at the code before my changes https://github.com/digitallyinduced/ihp/blob/3e311d3c78db2f2d69d934698b22c3f7a54e6159/IHP/View/CSSFramework.hs#L115-L130 it doesn't seem as if textarea was used before. Or maybe it's done somewhere else?

amitaibu commented 2 years ago

Oh, maybe that's the fieldInput formField.

amitaibu commented 2 years ago

So probably https://github.com/digitallyinduced/ihp/blob/51de9d6be69d7a176fa16998275076f7dd9da980/IHP/View/CSSFramework.hs#L140 should be changed.

mpscholten commented 2 years ago

Sadly there's no way to do something like <{variableTag} in HSX :) So I solved this by manually copying the function body

mpscholten commented 2 years ago

Also spotted https://github.com/digitallyinduced/ihp/issues/1248 while doing that :)