-
Notifications
You must be signed in to change notification settings - Fork 305
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
Multiple Attachment views in a single form, uploading file in one item also shows in other item. #1821
Comments
@santosh-pingle thanks for the bug report, I will have a look cc @f-odhiambo |
@FikriMilano any updates on it? thanks! |
@santosh-pingle not much update, I was logging the logic and doesn't found anything wrong. Still investigating, but I have a conjecture that it's related to the recycling of recycler view |
@FikriMilano similar issue was found in #1818, may be you need to clear the old state before binding the data to the item. |
@santosh-pingle I have created PR #1828 to close this ticket. Yeah, it turns out we need to clear the preview if there is no answer. And it has to be declared when binding the view holder. |
The reason why the other widget is also seems to be uploaded is because it recycles from the top widget, which already been uploaded. But if we click Delete at the other widget, it crashes because the answer is null. So it only recycles the view but not the answer. |
So, yeah, by clearing the preview if there is no answer will fix the bug |
Describe the bug
Questionnaire json file contains multiple attachment widgets.
When user start uploading file to respective attachment item, it also uploads same file to other attachment view.
When user delete file from other attachment view, application exits.
Referred questionnaire
component_attachment.txt
Captured video
Screen.Recording.2023-01-24.at.8.19.11.AM.mov
Component
SDC library
Expected behavior
Uploaded file should be shown in the respective attachment widget.
Screenshots
If applicable, add screenshots to help explain your problem.
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
Would you like to work on the issue?
Please state if this issue should be assigned to you or who you think could help to solve this issue.
The text was updated successfully, but these errors were encountered: