All threads / How do i use tom-select with stimulus and hotwire?
Ask A Question


You’re not receiving notifications from this thread.

How do i use tom-select with stimulus and hotwire?

Ahmad hamza asked in Rails

I'm using tom-select to either select from the options or create record in the modal. The problem happens when the form submits successfully and that newly created record is now have been selected in the dropdown.

Hotwire easily handles the stuff of showing validation errors on the modal but i'm not sure how to update the dropdown options using stimulus js.

I think i got the solution. I'll share a gist in sometime.

Thanks Ahmad! This helped me out a lot.

Join the discussion

Want to stay up-to-date with Ruby on Rails?

Join 68,099+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.

    logo Created with Sketch.

    Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more. Icons by Icons8

    © 2022 GoRails, LLC. All rights reserved.