You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there. I'm using the new https://github.com/bigskysoftware/idiomorph, which is working well except it is not preserving the content of my textareas. This is unfortunate as I have a poll every second which reloads the page so whatever you type in gets reset within a second. Not great UX ;-).
I know I can stick an id on the textarea element and use hx-preserve, but once the user submits the form I do actually want to reset the textareas.
I want to express "preserve the textareas during the periodic polling's hx-post but not on this particular hx-post". Is that possible?
I can also look into hx-sync as well, but I don't know - that feels pretty fragile. Not the code - the coupling between the elements.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there. I'm using the new https://github.com/bigskysoftware/idiomorph, which is working well except it is not preserving the content of my
textareas. This is unfortunate as I have a poll every second which reloads the page so whatever you type in gets reset within a second. Not great UX ;-).I know I can stick an
idon thetextareaelement and usehx-preserve, but once the user submits the form I do actually want to reset thetextareas.I want to express "preserve the
textareas during the periodic polling'shx-postbut not on this particularhx-post". Is that possible?I can also look into
hx-syncas well, but I don't know - that feels pretty fragile. Not the code - the coupling between the elements.How are other people handling this?
Beta Was this translation helpful? Give feedback.
All reactions