postlight / trimmings

🌲 Get back to HTML.
https://postlight.github.io/trimmings
Apache License 2.0
221 stars 8 forks source link

"Autosubmit + Replace" feature #14

Closed snellingio closed 4 years ago

snellingio commented 5 years ago

Looking through the autosubmit and the replace javascript.

Wondering how to best write a "search" feature.

How I'd like it to work: On input change, submit the form, and replace the dom section. I also have a couple of checkboxes that I'd like to do the same thing.

johnholdun commented 4 years ago

You can add multiple to directives to a single form. In this case, add autosubmit to the form and/or individual inputs, and add inline to the form to target a container somewhere on the page.

I'm assuming this answers your question and closing the ticket, but if I misunderstood or this isn't satisfactory for some reason, please leave another comment and let me know. Thanks!