Closed luismoyano closed 1 year ago
I think this PR fixed that https://github.com/rails/request.js/pull/50
Ah yes! I can see it now, I'm using request.js from npm directly, is there any chance to update it there or do I need to use the gem? (I'd rather not to)
@luismoyano you saying you have defined request.js
as a dependency on your package.json
file? If so, you can just change the following
"@rails/request.js": "^0.0.6",
to
"@rails/request.js": "https://github.com/rails/request.js.git#main",
That will use what is available on main.
btw, I just published v0.0.7 https://www.npmjs.com/package/@rails/request.js/v/0.0.7
can you test and see if it works? I'll close the issue, but let me know if the problem persists and we can work on a fix
Hello!
Having a form with a multiselect where all the options are selected, only the last one is sent to the server.
How to reproduce:
FormData
new FetchRequest('get', 'a/url', {contentType: 'application/json', responseKind: 'json', data: yourFormData})
query
method withyourFetchRequest.query
This happens on utils.js on the merge entries method: The entries for a multiselect have identical keys looking similar to
my_model[my_multi_field][]
and different values which are deleted and replaced for the last one.