Can't type in the "Other" pairing tech option
Closed this issue · 7 comments
Using Chrome Version 56.0.2924.18 dev
This is a known issue amongst the team - but we hadn't added it here yet. Thanks for adding it.
Just to clarify - it doesn't work on any browser :)
sorry for the slew of issues.
It's great seeing you guys actively working on this.
I'd love to jump in when I get the time 👍
No worries - we appreciate the issues. While we know about all of them, we do forget to add them clearly ourselves sometimes :)
You speak as if you have a means of easy communication within your team.
How would people that want to contribute join that so as to know what needs to be done and where to contribute, etc.?
Most of the communication is handled via the Issues threads and Pull requests on GitHub. Sometimes people reach out to me via the forum or a couple of different Slack groups I'm also in.
Everything that should be discussed properly should be in issues threads though - which works 90% of the time, except for when there are small omissions.
Note that if you try to type in the "Other" field it will give a 400 Bad Request
from the server.
It seems like the setup
property that is send to the server contains the first letter you "input" (invisibly) in the "Other" field.
Selecting "Preferred Technologies" doesn't work either, because it doesn't run handleChange
. This doesn't throw an error, but it simply won't show anything (because it wasn't sent).
I found the error (in case nobody else did it already): The server expects setup
to be an array (which should be created from the "Preferred Technologies", which it doesn't). But the real problem is that the "Other" field also changes setup
. Since the name of the "Other" field is setup
, this is also set as the ID of the input element. Then handleChange
assigns the value (whatever you typed in) to [e.target.id]
(which is setup
). So setup
gets overwritten with a string, instead of an array. The server then returns a 400 Bad Request
and nothing is added.
EDIT: handleChange
doesn't run because the props.handleChange
is not passed into the ModalSelectionList
in ModalForm.js
.
EDIT 2: You can type inside the "Other" field, but since every onChange
updates the state
and therefore refreshes everything, it gets empty every time you type something. The problem is that the value of the "Other" field isn't saved inside the state and manually set to ""
in ModalForm.js
.
I think it is best if the "Other" field gets another name
(and so also another ID). The value of the "Other" field should be kept in the state
(so that it can be updated). The server should than handle another property. It is no problem if the backend isn't updated directly, since it will only skip it, instead of giving an error. Or does the backend check for unknown properties?