inveniosoftware / react-invenio-deposit

React application for Invenio deposit forms.
https://react-invenio-deposit.readthedocs.io
MIT License
3 stars 45 forks source link

Additional Description field loses language selection #576

Open zguillen opened 1 year ago

zguillen commented 1 year ago

Package version (if known): 0.19.15

Describe the bug

The additional description component loses what the user has selected for language when saving the draft.

Steps to Reproduce

  1. Go to https://inveniordm.web.cern.ch/uploads/new
  2. check metadata only record, No for DOI, pick any resource type and add testing for title, click save draft.
  3. enter 'test' for description, click add description button, enter 'test' for add'l description text, select abstract for type drop down, type in english for language and select Bahamas Creole English, click save draft button.
  4. The language drop down will revert back to 'select language'

Expected behavior

The language stays as the user selected

Screenshots (if applicable)

selection made for language: image after save draft button clicked, language selection is lost: image

Additional context

It appears from the network tab that the language is sent and received in the json payloads of the PUT to /api/records endpoint but the UI is failing to re-render the selected language (so it is persisted to the db)