-
Notifications
You must be signed in to change notification settings - Fork 8
fix/AB#106122_ABC-resource-question-display-glitches #2713
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
base: beta
Are you sure you want to change the base?
fix/AB#106122_ABC-resource-question-display-glitches #2713
Conversation
…resource query on component mount, not on component open
☁️ Nx Cloud ReportCI is running/has finished running commands for commit e36d100. As they complete they will appear below. Click to see the status, the terminal output, and the build insights. 📂 See all runs for this CI Pipeline Execution ✅ Successfully ran 1 targetSent with 💌 from NxCloud. |
…glitches # Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
As shown in the video, you select the resource from the first page ( 10 first items of the query ) |
@unai-reliefapp |
…end into fix/AB#106122_ABC-resource-question-display-glitches
…eful query subscription from the extended graphql component fix: update of values for outside of list elements in the resource dropdown for survey by always reassigning selected values from the list in the graphql component feat: improve the selectedResource property to avoid undefined trash values
@AntoineRelief , last commit Compartir.pantalla.-.2024-11-29.16_15_49.mp4 |
…f github.com-relief:ReliefApplications/ems-frontend into fix/AB#106122_ABC-resource-question-display-glitches
(node) => node[this.valueField] === selectedElement[this.valueField] | ||
) | ||
(this.isSurveyQuestion || | ||
!elements.find( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@unai-reliefapp
to be more generic, perhaps we should find another way to do it
I believe the issue is due to the fact that the selectedItem is not taken into consideration when you provide a new list of choices, and it's not only affecting the resource-dropdown component, but I got the feeling we've already managed to fix that in some of the instances of the graphql select component
from what I know, it's quicker to fetch the single selected resource than the first 10, and so it creates this error
I'll put back the ticket in todo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem was that the change detector ref was not working as expected due to the integration in the survey js and that we are using and extended component from graphql component. In the rest of the graphql instances in the application the default logic is working fine because of the change detector ref is working as expected. This way i make sure that on surveyjs the default logic to trigger the selected item outside the default fetche list is also added.
What do you have in mind for this then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@unai-reliefapp
I can see a lot of change detector call in the stack, they don't work ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No to this component level deepness, with surveyjs and an extended graphql component. That's why I used the isSurveyQuestion flag on this one to trigger the selected element insertion outside the default fetched list
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay, I'll have a look at it then
thanks for the explanation 👍
Description
fix: initialize resource query on component mount, not on component open
Useful links
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.
Screenshots
Compartir.pantalla.-.2024-11-27.15_33_32.mp4
We now initialize resource query on component mount, not on dropdown open
Checklist:
( * == Mandatory )
More explanation
https://www.loom.com/share/05a716d61b9744faaf51fb304c21d1e5?sid=f87cf896-582a-4f76-93ae-8ceed801b145