-
Notifications
You must be signed in to change notification settings - Fork 433
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
Relationship lookup component displays misleading information #3312
Comments
If I'm understanding correctly, the core issue here is that that arrow dropdown (to the right of "Person Search Results") should not be displayed when there are no results. Instead, in the example above, if you select "Select Page" it seems it is trying to select the first page of results as if there was no search. For instance, I see that the "Select Page" option appears to work properly when "Person Search Results" has results to display. So, I believe this bug may be fixed if the "Select Page" and "Deselect Page" options no longer exist when the page of search results is empty. Needs a volunteer. |
Yes, I think you're right - your proposed change should solve all the problems described. |
Good morning @tdonohue! I've been looking for a few days and testing possible solutions to this problem and I've come up with a few possibilities:
I've tested all these different ways and it works, but unfortunately the condition is only reproduced once and then it doesn't work anymore. The tests were carried out on the component: I hope this helps in some way, and if you have any suggestions, please let me know. |
@Andrea-Guevara : I don't understand what you mean by this..
Are you saying that all the fixes you tried are unsuccessful? Or they only partially work? I'm not sure what to recommend here as I'm not familiar with this area of the code. But, if the fixes that are attempted only partially work, that means there must be a larger bug here. I'm not sure where it would be offhand, but that may imply that someone would need to dig deeper as to why a basic fix only works temporarily. |
Good afternoon @tdonohue, I hope you're well! I didn't explain myself very well! If I open the modal and it has results the return would be “true” but if no results are present, the return would be “false”. It seems that this switch between true and false isn't identified, so it's almost impossible to condition the dropdown so that it doesn't appear if no results are found. I hope I've made myself clear haha. If it's still not clear, let me know. |
@Andrea-Guevara : Ok, I understand now. Unfortunately, I'm not sure of the answer myself. It does sound like something is cached here. It may need some digging / debugging to understand what is going on. That's not something I have time for at the moment. The only alternative is to find a different way to solve this issue. Obviously, the core issue here is that you shouldn't be able to select a page if there are no pages. I'm not sure myself of a better solution at the moment. Hopefully, if another developer has an idea here, they'll chime in on this discussion. |
…nditionally - Emit a result list even if no items are found (result list of 0 items) - The "Select page" and "Deselect page" drop-down options in the search results list are disabled if there are zero items in the result list Fixes: DSpace#3312
@Andrea-Guevara Thank you for your initial research and solutions. I have taken your suggestions and discussion and submitted a PullRequest proposal. There you can also see the possible solution that an event is still triggered if the result set is empty - I think that was still the problem? I look forward to your feedback, or possibly a merge if everything is OK. |
Describe the bug
There is a bug in DSpace when you are in the submission process and use the lookup to search for an author to create a new relationship. The information displayed in the component is incorrect and does not reflect the current relationship state of the submission item.
My test was made locally with DSpace in version 8, the same error occurs in the sandbox (sandbox.dspace.org) with Version 9.
To reproduce
Now there are several problems to the user:
Expected behavior
Screenshots
The text was updated successfully, but these errors were encountered: