#3802 (Cannot edit choicelist fields when using React (dropdown being used wrongly))
by Luc Saffre · in Developers · assigned to tonis
Kokkuvõte
Children
Kommentaarid
- 6 aastat ago by Luc Saffre about #3802 (Cannot edit choicelist fields when using React (dropdown being used wrongly)) : In amici1 the problem seems to be fixed. A miracle?
- 6 aastat ago by Luc Saffre about #3802 (Cannot edit choicelist fields when using React (dropdown being used wrongly)) : I tried lots of things, but without success. Next time: [url TODO: reactjs.org/tutorial/tutorial.html]
- 6 aastat ago by Luc Saffre about #3802 (Cannot edit choicelist fields when using React (dropdown being used wrongly)) : HO with Tonis where I learned about using the debugger to get a clue of what's happening. Of course the issue is caused by the changes in the [url www.primefaces.org/primereact/showcase/#/setup Dropdown component]. optionValue={"value"} and dataKey={"value"} were missing.
- 6 aastat ago by tonis about #3802 (Cannot edit choicelist fields when using React (dropdown being used wrongly)) : Had a short moment to look at it during Nora's nap. Yes something's strange has happened. When selecting a choice the on-chance is only returning the hidden_value choice, not an object like {text:"high", value:"40"}, which I can see from the code is what is used to return. So it's expected that it's...
- 6 aastat, 1 kuu ago by Luc Saffre about #3802 (Cannot edit choicelist fields when using React (dropdown being used wrongly)) : After talking with Tonis and looking into the code, I guess the problem is in file LinoComponents.js (class ChoiceListFieldElement). Some API had been updated meanwhile, which means that some call needs to get adapted...
- 6 aastat, 1 kuu ago by Luc Saffre about #3802 (Cannot edit choicelist fields when using React (dropdown being used wrongly)) : The problem was introduced by commit c91c99426e169a9d3b5cef81b63c46a23a3a88e8 (20200905 "Switch to npm PR and build"). (When I checkout 7eb5eb43dc5add6b1f3efd58106e50aca9cb16af, the version before this commit), the error disappears.
- 6 aastat, 1 kuu ago by Luc Saffre about #3802 (Cannot edit choicelist fields when using React (dropdown being used wrongly)) : The problem actually occurs for every choicelist field. Maybe caused by my "moved choices_response() to lino.core.views" change. At least in extjs all choicelists including their chocies are generated into the linoweb.js at startup.
- 6 aastat, 1 kuu ago by Luc Saffre about #3802 (Cannot edit choicelist fields when using React (dropdown being used wrongly)) : How reproduce: go team, sign in as robin, select Configure -> Products -> Services. Double click on the only row. 127.0.0.1:8000/#/api/products/Products/1 Note the fields "VAT class" and "Delivery unit". Click Edit button : now these fields are empty.