rdmorganiser / rdmo

A tool to support the planning, implementation, and organization of research data management.
https://rdmorganiser.github.io
Apache License 2.0
105 stars 49 forks source link

Option set provider with refresh enabled inside a collection prevents switchig between tabs / collections #1147

Closed hafu closed 2 months ago

hafu commented 2 months ago

Description / Beschreibung

When using a option set provider with autocomplete widget, which uses refresh = True inside a collection on page level (is collection), the user can not switch between the tabs / sets and is stuck at the last created one, if a new one is created or the first one when answering the questions.

This only occurs on option set providers inside a collection with refresh = True. For example with rdmo-plugins-gnd.

Expected behaviour / Erwartetes Verhalten

The user can switch between tabs / sets.

Steps to reproduce / Schritte zum Reproduzieren

  1. Create a catalog which includes a question with an option set provider which uses refresh = True on a page which is a collection
  2. On the page with is collection flag click on + Set and give it a name, for example test1
  3. Fill out the question(s)
  4. Add another set by clicking on + Set and give it a name, for example test2
  5. Fill out the question(s)
  6. Click on the fist tab / set (test1) -> Switches back to the previously created one (test2)

image Page with is collection enabled and a question using an option set provider with refresh = True as autocomplete widget type: The user can not switch to "test1" after creating "test2" and is stuck on the last created one.

Or if already filled out:

  1. Go to the page which is a collection with the option set provider and autocomplete
  2. Try to switch between the sets -> Switches back to the first one (test1)

image Page with is collection enabled and a question using an option set provider with refresh = True as autocomplete widget type: After the user browsed to the page, the user can not switch from "test1" to "test2".

Note: In the example screenshots the rdmo-plugins-wikidata plugin was used, which does not use refresh = True by default. It was modified for testing purposes by setting the refresh flag to True. A better example is the rdmo-plugins-gnd plugin.

Context / Kontext

References / Verweise

*

jochenklar commented 2 months ago

Hi @hafu , thanks for reporting. The last commit should fix the bug. If you have time, you can install the wheel from the GitHub action once it is completed.

hafu commented 2 months ago

Thanks for the quick fix! I've tested it and it works.

jochenklar commented 2 months ago

Awesome, thanks! We will publish the new version later this week. Lets see what else comes up.