New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
useClickOutside not work Submit form button #483
Comments
Hi nikolaokonesh, I tried this:
|
not work Submit button |
@divagueame variants? |
Hi Nikola, I don't know what could be the issue. It seems it works correctly on my machine. Unfortunately, I could not reproduce the example you have provided, since I don't know what html was generated from that code. I tried briefly once again, and I could something work similar to your example like that: instead of: I did something like this: Notice the data in render is not inside the locals. That would be my first guess without having the full picture. If you could describe a bit better what exactly is not working, that could be helpful to give you a hand. Just 'not work Submit button' is not clear enough to me. It would be helpful to know what behaviour you are experiencing and what html is being rendered. |
This example nested comments // app/javascript/controllers/comment_reply_controller.js
// app/views/comments/_comment_with_replies.html.erb
Please how add useClickOutside |
@nikolaokonesh try removing the Your controller would look like this then: import { Controller } from "stimulus"
export default class extends Controller {
static targets = [ "form" ]
toggle(event) {
this.formTarget.classList.toggle("d-none")
}
} |
useClickOutside not work Submit form button why?
The text was updated successfully, but these errors were encountered: