Can we connect action to target's click event?


First, thanks creat Stimulus, it’s awesome.

I have form like below screenshot:

When file_field change, it will call method setting#finishUpload
In finishUpload of setting controller, it call

Can we connect action to target’s click event?

Something like action: “change->” ?

It looks like there is a syntax error in your controller, but you could also just make your form a target

<%= form_for @model, remote: true, data: { target: 'setting.form' } %>
export default class extends Controller { 
  static targets = ['form'];

  finishUpload(e) {