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

Single-Select Matrix ignores hideIfRowsEmpty: true if a visibleIf expression evaluates to true #8495

Closed
phuongvannguyen opened this issue Jul 2, 2024 · 3 comments · Fixed by #8499
Assignees
Labels
bug user issue An issue or bug reported by users
Milestone

Comments

@phuongvannguyen
Copy link

phuongvannguyen commented Jul 2, 2024

Are you requesting a feature, reporting a bug or asking a question?
I'm requesting a feature

What is the current behavior?
When I set a matrix Q3 with 'Hide the question if it has no rows"= True, row visible if Q2 = 'abc' and Q3 is visible if Q1 = yes then when I choose Q1 = No and input 'abc' for Q2--> Q3 is shown despite of the condition Q3 is visible if Q1 = yes.

What is the expected behavior?
The expectation in this case is Q3 is not shown. Q3 is shown only if when Q1 = Yes and it has rows

Below is my test on online demo

{
"logoPosition": "right",
"pages": [
{
"name": "page1",
"elements": [
{
"type": "boolean",
"name": "question1",
"title": "Q1"
},
{
"type": "text",
"name": "question2",
"title": "Q2"
},
{
"type": "matrix",
"name": "question3",
"visibleIf": "{question1} = true",
"title": "Q3",
"columns": [
"Column 1",
"Column 2",
"Column 3"
],
"rows": [
{
"value": "Row 1",
"visibleIf": "{question2} = 'abc'"
},
"Row 2"
],
"hideIfRowsEmpty": true
}
]
}
]
}

340255877-555a6f0e-4f7a-4d46-8cd9-6e9b80ade8aa

@JaneSjs JaneSjs self-assigned this Jul 2, 2024
@JaneSjs
Copy link
Contributor

JaneSjs commented Jul 2, 2024

Hello,
Thank you for sharing a demo. In your survey configuration, Q3 has Row 2 which always appears regardless of confitional logic.

Would you please elaborate on your end goal?

@JaneSjs JaneSjs added need more info user issue An issue or bug reported by users labels Jul 2, 2024
@JaneSjs JaneSjs removed their assignment Jul 2, 2024
@JaneSjs
Copy link
Contributor

JaneSjs commented Jul 2, 2024

To our developers:
@andrewtelnov, when a matrix defines two visibility conditions (visibleIf and hideIfRowsEmpty: true), a matrix appears even though its rows are invisible. Please consider this demo: View Plunker.

{
 "logoPosition": "right",
 "pages": [
  {
   "name": "page1",
   "elements": [
    {
     "type": "boolean",
     "name": "question1",
     "title": "Q1"
    },
    {
     "type": "text",
     "name": "question2",
     "title": "Q2"
    },
    {
     "type": "matrix",
     "name": "question3",
     "visibleIf": "{question1} = true",
     "title": "Q3",
     "columns": [
      "Column 1",
      "Column 2",
      "Column 3"
     ],
     "rows": [
      {
       "value": "Row 1",
       "visibleIf": "{question2} = 'abc'"
      },
      {
       "value": "Row 2",
       "visibleIf": "{question2} = 'abc'"
      }
     ],
     "hideIfRowsEmpty": true
    }
   ]
  }
 ]
}

image

Expected behavior: a matrix doesn't appear unless a row becomes visible.

@phuongvannguyen
Copy link
Author

phuongvannguyen commented Jul 2, 2024 via email

andrewtelnov added a commit that referenced this issue Jul 2, 2024
tsv2013 pushed a commit that referenced this issue Jul 3, 2024
@OlgaLarina OlgaLarina added this to the v1.11.6 milestone Jul 8, 2024
@RomanTsukanov RomanTsukanov changed the title Matrix question configured with visible if condition and 'Hide the question if it has no rows"= True Single-Select Matrix ignores hideIfRowsEmpty: true if a visibleIf expression evaluates to true Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug user issue An issue or bug reported by users
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants