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

If multiple slider views are present in a single form, then changing a value of one slider updates value of another slider. #1818

Closed
santosh-pingle opened this issue Jan 19, 2023 · 2 comments · Fixed by #1819
Assignees
Labels
effort:small Small effort - 2 days P1 High priority issue type:bug Something isn't working

Comments

@santosh-pingle
Copy link
Collaborator

Describe the bug
A questionnaire form contains n number of slider such way that some of the sliders are not visible at that moment, to make it visible user has to scroll the form at the top or bottom, if value get changed in one of the slider then same value also get changed in another slider.

Component
SDC library

To Reproduce
Precondition :
Add multiple slider views in questionnaire form.

Steps to reproduce the behavior:

  1. Go to catalog app
  2. Click on Slider component
  3. Scroll down to slider view, update the value, check other sliders, value get changed.

Expected behavior
Changing value in one slider should not update the value in other slider.

Screenshots
If applicable, add screenshots to help explain your problem.

Screen.Recording.2023-01-19.at.11.53.26.AM.mov

Smartphone (please complete the following information):

  • Device: Pixel XL emulator
  • Android version:Android Api 30
  • Build number: not required
  • Version not required.

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.

@santosh-pingle santosh-pingle added P1 High priority issue type:bug Something isn't working effort:small Small effort - 2 days labels Jan 19, 2023
@santosh-pingle
Copy link
Collaborator Author

{
  "resourceType": "Questionnaire",
  "item": [
    {
      "linkId": "1",
      "text": "slider 1",
      "type": "integer",
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
          "valueCodeableConcept": {
            "coding": [
              {
                "system": "http://hl7.org/fhir/questionnaire-item-control",
                "code": "slider",
                "display": "Slider"
              }
            ]
          }
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/maxValue",
          "valueInteger": 15
        }
      ],
      "item": [
        {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-displayCategory",
              "valueCodeableConcept": {
                "coding": [
                  {
                    "system": "http://hl7.org/fhir/questionnaire-display-category",
                    "code": "instructions"
                  }
                ]
              }
            }
          ],
          "linkId": "1-most-recent",
          "text": "Select a date 4 weeks from now",
          "type": "display"
        }
      ]
    },
    {
      "linkId": "2",
      "text": "slider 2",
      "type": "integer",
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
          "valueCodeableConcept": {
            "coding": [
              {
                "system": "http://hl7.org/fhir/questionnaire-item-control",
                "code": "slider",
                "display": "Slider"
              }
            ]
          }
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/maxValue",
          "valueInteger": 15
        }
      ],
      "item": [
        {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-displayCategory",
              "valueCodeableConcept": {
                "coding": [
                  {
                    "system": "http://hl7.org/fhir/questionnaire-display-category",
                    "code": "instructions"
                  }
                ]
              }
            }
          ],
          "linkId": "1-most-recent",
          "text": "Select a date 4 weeks from now",
          "type": "display"
        }
      ]
    },
    {
      "linkId": "3",
      "text": "slider 3",
      "type": "integer",
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
          "valueCodeableConcept": {
            "coding": [
              {
                "system": "http://hl7.org/fhir/questionnaire-item-control",
                "code": "slider",
                "display": "Slider"
              }
            ]
          }
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/maxValue",
          "valueInteger": 15
        }
      ],
      "item": [
        {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-displayCategory",
              "valueCodeableConcept": {
                "coding": [
                  {
                    "system": "http://hl7.org/fhir/questionnaire-display-category",
                    "code": "instructions"
                  }
                ]
              }
            }
          ],
          "linkId": "1-most-recent",
          "text": "Select a date 4 weeks from now",
          "type": "display"
        }
      ]
    },
    {
      "linkId": "4",
      "text": "slider 4",
      "type": "integer",
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
          "valueCodeableConcept": {
            "coding": [
              {
                "system": "http://hl7.org/fhir/questionnaire-item-control",
                "code": "slider",
                "display": "Slider"
              }
            ]
          }
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/maxValue",
          "valueInteger": 15
        }
      ],
      "item": [
        {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-displayCategory",
              "valueCodeableConcept": {
                "coding": [
                  {
                    "system": "http://hl7.org/fhir/questionnaire-display-category",
                    "code": "instructions"
                  }
                ]
              }
            }
          ],
          "linkId": "1-most-recent",
          "text": "Select a date 4 weeks from now",
          "type": "display"
        }
      ]
    },
    {
      "linkId": "5",
      "text": "slider 5",
      "type": "integer",
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
          "valueCodeableConcept": {
            "coding": [
              {
                "system": "http://hl7.org/fhir/questionnaire-item-control",
                "code": "slider",
                "display": "Slider"
              }
            ]
          }
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/maxValue",
          "valueInteger": 15
        }
      ],
      "item": [
        {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-displayCategory",
              "valueCodeableConcept": {
                "coding": [
                  {
                    "system": "http://hl7.org/fhir/questionnaire-display-category",
                    "code": "instructions"
                  }
                ]
              }
            }
          ],
          "linkId": "1-most-recent",
          "text": "Select a date 4 weeks from now",
          "type": "display"
        }
      ]
    },
    {
      "linkId": "6",
      "text": "slider 6",
      "type": "integer",
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
          "valueCodeableConcept": {
            "coding": [
              {
                "system": "http://hl7.org/fhir/questionnaire-item-control",
                "code": "slider",
                "display": "Slider"
              }
            ]
          }
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/maxValue",
          "valueInteger": 15
        }
      ],
      "item": [
        {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-displayCategory",
              "valueCodeableConcept": {
                "coding": [
                  {
                    "system": "http://hl7.org/fhir/questionnaire-display-category",
                    "code": "instructions"
                  }
                ]
              }
            }
          ],
          "linkId": "1-most-recent",
          "text": "Select a date 4 weeks from now",
          "type": "display"
        }
      ]
    },
    {
      "linkId": "7",
      "text": "slider 7",
      "type": "integer",
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
          "valueCodeableConcept": {
            "coding": [
              {
                "system": "http://hl7.org/fhir/questionnaire-item-control",
                "code": "slider",
                "display": "Slider"
              }
            ]
          }
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/maxValue",
          "valueInteger": 15
        }
      ],
      "item": [
        {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-displayCategory",
              "valueCodeableConcept": {
                "coding": [
                  {
                    "system": "http://hl7.org/fhir/questionnaire-display-category",
                    "code": "instructions"
                  }
                ]
              }
            }
          ],
          "linkId": "1-most-recent",
          "text": "Select a date 4 weeks from now",
          "type": "display"
        }
      ]
    },
    {
      "linkId": "8",
      "text": "slider 8",
      "type": "integer",
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
          "valueCodeableConcept": {
            "coding": [
              {
                "system": "http://hl7.org/fhir/questionnaire-item-control",
                "code": "slider",
                "display": "Slider"
              }
            ]
          }
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/maxValue",
          "valueInteger": 15
        }
      ],
      "item": [
        {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-displayCategory",
              "valueCodeableConcept": {
                "coding": [
                  {
                    "system": "http://hl7.org/fhir/questionnaire-display-category",
                    "code": "instructions"
                  }
                ]
              }
            }
          ],
          "linkId": "1-most-recent",
          "text": "Select a date 4 weeks from now",
          "type": "display"
        }
      ]
    },
    {
      "linkId": "9",
      "text": "slider 9",
      "type": "integer",
      "extension": [
        {
          "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl",
          "valueCodeableConcept": {
            "coding": [
              {
                "system": "http://hl7.org/fhir/questionnaire-item-control",
                "code": "slider",
                "display": "Slider"
              }
            ]
          }
        },
        {
          "url": "http://hl7.org/fhir/StructureDefinition/maxValue",
          "valueInteger": 15
        }
      ],
      "item": [
        {
          "extension": [
            {
              "url": "http://hl7.org/fhir/StructureDefinition/questionnaire-displayCategory",
              "valueCodeableConcept": {
                "coding": [
                  {
                    "system": "http://hl7.org/fhir/questionnaire-display-category",
                    "code": "instructions"
                  }
                ]
              }
            }
          ],
          "linkId": "1-most-recent",
          "text": "Select a date 4 weeks from now",
          "type": "display"
        }
      ]
    }
  ]
}

@aditya-07 aditya-07 added this to the Data Capture Library 1.0 milestone Jan 19, 2023
@omarismail94 omarismail94 removed this from the Data Capture Library 1.0 milestone Jan 19, 2023
@aditya-07 aditya-07 added this to the Data Capture Library 1.0.0 milestone Jan 20, 2023
@santosh-pingle santosh-pingle changed the title If multiple slider views are present in a single form, then changing a value of one slider updates value of another slider also.. If multiple slider views are present in a single form, then changing a value of one slider updates value of another slider. Jan 23, 2023
@aditya-07 aditya-07 self-assigned this Jan 23, 2023
@github-project-automation github-project-automation bot moved this from New to Complete in Android FHIR SDK Jan 23, 2023
@jingtang10
Copy link
Collaborator

great catch santosh and thanks for fixing aditya!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
effort:small Small effort - 2 days P1 High priority issue type:bug Something isn't working
Projects
Status: Complete
Development

Successfully merging a pull request may close this issue.

4 participants