MatrixDynamic maxRowCount not changing if decreasing
See original GitHub issueAre you requesting a feature, reporting a bug or ask a question?
bug
What is the current behavior?
When decreasing maxRowCount on MatrixDynamic, property on MatrixDynamic did not change. If increasing the value it’s ok.
What is the expected behavior?
maxRowCount property always set to provided value
How would you reproduce the current behavior (if this is a bug)?
Set value of rowCount/minRowCount/maxRowCount from the text field. Input 3, set the properties rowCount/minRowCount/maxRowCount on matrixdynamic. Input 1, set the properties rowCount/minRowCount/maxRowCount on matrixdynamic.
1 row displayed (rowCount), minRowCount is 1, but it’s possible to add 2 more rows (maxRowCount still is 3).
Provide the test code and the tested page URL (if applicable)
Tested page URL: https://plnkr.co/edit/SU3l9zVuNfAJ8hnOcqSn?p=preview
Test code
survey
.onValueChanged
.add(function (survey, options) {
var numberRows = parseInt(options.value)
if (numberRows) {
var question = survey.getQuestionByName('teachersRate')
question.rowCount = numberRows
question.maxRowCount = numberRows
question.minRowCount = numberRows
console.log(question.maxRowCount)
}
})
Specify your
- browser:
- browser version:
- surveyjs platform (angular or react or jquery or knockout or vue):
- surveyjs version:
Issue Analytics
- State:
- Created 6 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
MatrixDynamic maxRowCount not changing if decreasing #973
When decreasing maxRowCount on MatrixDynamic, property on MatrixDynamic did not change. If increasing the value it's ok. What is the expec.
Read more >QuestionMatrixDynamicModel - SurveyJS
maxRowCount property. A maximum number of rows in the matrix. Users cannot add new rows if rowCount equals maxRowCount . Default value: 1000...
Read more >how to use matrixdynamic with nouislider in angular9
I have kind of matrixdynamic table but how can i use inside slider or nouislider instead of the radio button? and how can...
Read more >Use options to customize the Survey Editor, Survey Builder ...
triggerNotSet:"The trigger is not set",triggerRunIf:"Run if",triggerSetToName:"Change value of: ",triggerFromName:"Copy value from: " ...
Read more >change text of rows in type matrix surveyjs - Stack Overflow
You can add matrix rows dynamically: var json = { questions: [ { type: "matrix", name: "score", title: "Please score the employees in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@snay We have rewritten this. Now you can set question.maxRowCount/minRowCount without if statement.
Thank you, Andrew
Tricky, but works for my case, thanks a lot.