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

react: checkbox column is editable for readonly matrix if showInMultipleColumns is true #2560

Closed
zhnedyalkow opened this issue Dec 4, 2020 · 7 comments
Labels
Milestone

Comments

@zhnedyalkow
Copy link

zhnedyalkow commented Dec 4, 2020

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

Reporting a bug

What is the current behavior?

Display mode and readOnly modes did not affect the 'matrixdropdown' type

What is the expected behavior?

By using 'display' mode in surveyjs implemented in React web app, I am expecting that all different types (checkboxes, radio buttons, single and multi choice matrix) will be disabled respectively.

How would you reproduce the current behavior (if this is a bug)?

Basically extend the survey json => survey.mode = 'display'; Note that in the surveyjs designer everything seems to be working properly.

Provide the test code and the tested page URL (if applicable)

Tested page URL: https://surveyjs.io/create-survey

Test code

const surveyJSON = {"pages":[{"name":"page1","elements":[{"type":"matrixdropdown","name":"2628","title":"Rate your level of agreement with each of the statements below.","defaultValue":{"1832":{"col1":["7","6"]},"1835":{"col1":["7","6"]},"1836":{"col1":["6","7"]},"1844":{"col1":["7","6"]},"1845":{"col1":["7","6"]}},"readOnly":true,"columns":[{"name":"col1","cellType":"checkbox","showInMultipleColumns":true,"choices":[{"value":"10","text":"Disagree"},{"value":"9","text":"Somewhat Disagree"},{"value":"7","text":"Somewhat Agree"},{"value":"6","text":"Agree"}]}],"rows":[{"value":"1836","text":"I know what job/career I want to do when I finish school."},{"value":"1832","text":"I know how to explore and get information about careers I might be interested in."}]}],"title":"Test"}]}

Specify your

  • browser:
  • browser version:
  • surveyjs platform (angular or react or jquery or knockout or vue): react
  • surveyjs version: 1.7.18
@andrewtelnov
Copy link
Member

@zhnedyalkow To be on the same page. You are talking about the bug, that you can check/uncheck checkboxes when the question is read-only?
We will fix this one. It happens when column in showInMultipleColumns mode.

Thank you,
Andrew

@andrewtelnov
Copy link
Member

Here is the plunker example.

@andrewtelnov andrewtelnov changed the title Display and readOnly mode does not affect the matrixdropdown type react: checkbox column is editable for readonly matrix if showInMultipleColumns is true Dec 4, 2020
andrewtelnov added a commit that referenced this issue Dec 4, 2020
@andrewtelnov andrewtelnov added this to the v1.8.19 milestone Dec 4, 2020
@andrewtelnov
Copy link
Member

@zhnedyalkow Fixed by the commit above.
The problem was in react and only with checkbox column with showInMultipleColumns property set to true.

Thank you,
Andrew

@zhnedyalkow
Copy link
Author

Hi @andrewtelno,

Thank you for your prompt response.

When the fix will be available to be applied on npm?

Br,
Zhitomir

@andrewtelnov
Copy link
Member

@zhnedyalkow We are releasing every week, commonly every Tuesday. However we can delay on couple days.
You can check this page and see our previous releases.

Thank you,
Andrew

@zhnedyalkow
Copy link
Author

@andrewtelnov thank you, in this case let's keep issue open until release date.

Br,
Zhitomir

@zhnedyalkow
Copy link
Author

@andrewtelnov the issue is resolved. You can close this ticket.

Thank you, great support!

Br,
Zhitomir

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants