|
|
|
@ -2146,8 +2146,19 @@ class PollNew extends Component {
|
|
|
|
|
} else {
|
|
|
|
|
for (var i = 0; i < arr.length; i++) {
|
|
|
|
|
if (index === i) {
|
|
|
|
|
arr[i].question.min_choices = parseInt(value);
|
|
|
|
|
arr[i].question.max_choices = length;
|
|
|
|
|
try {
|
|
|
|
|
if(parseInt(value)===0){
|
|
|
|
|
arr[i].question.min_choices = 2;
|
|
|
|
|
arr[i].question.max_choices = length;
|
|
|
|
|
}else{
|
|
|
|
|
arr[i].question.min_choices = parseInt(value);
|
|
|
|
|
arr[i].question.max_choices = length;
|
|
|
|
|
}
|
|
|
|
|
}catch (e) {
|
|
|
|
|
arr[i].question.min_choices = 2;
|
|
|
|
|
arr[i].question.max_choices = length;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|