Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
hafu opened this issue Sep 9, 2024 · 3 comments

Comments

@hafu
Copy link

hafu commented Sep 9, 2024

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

  • Linux
  • RDMO version 2.2.0, also tested with 2.1.3

References / Verweise

@jochenklar
Copy link
Member

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
Copy link
Author

hafu commented Sep 10, 2024

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

@jochenklar
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants