Closed awlayton closed 5 years ago
I managed to reproduce the error using surveyjs_react_quickstart
and replacing the contents of App.js
with the following:
import React, {Component} from 'react'
import * as Survey from "survey-react";
import "survey-react/survey.css";
class App extends Component {
json = {
pages: [
{
name: 'uav-sensors',
title: 'Sensors',
elements: [
{
name: 'sensors',
title: 'Sensors',
type: 'paneldynamic',
panelCount: 1,
panelAddText: 'Add Sensor',
panelRemoveText: 'Remove Sensor',
templateTitle: 'Sensor #{panelIndex}',
templateElements: [
{
name: 'uav-sensor-type',
valueName: 'type',
title: 'Type',
type: 'dropdown',
isRequired: true,
hasOther: true,
choices: [
'RGB',
'Multispectral',
'Hyperspectral',
'LiDAR',
'Thermal',
],
},
],
},
],
},
]
};
render() {
var model = new Survey.Model(this.json);
return (<Survey.Survey model={model} onComplete={this.onComplete}/>);
}
}
export default App;
Fix will be available in the nearest update, most likely tomorrow.
@awlayton what was the actual issue? still occurring in my application
I didn't have to change anything. Once I updated to the new version I haven't had the problem. I'm not sure what was changed in the library.
Are you requesting a feature, reporting a bug or asking a question?
Reporting a bug
What is the current behavior?
Since upgrading survey-react, I get the below error whenever my page has collapsed panels or dynamic panels.
In the case of collapsed panels the site works fine until I try to expand the panel. Then I get the mentioned error in the console and the page becomes blank. Whenever I try to load a page of questions with a dynamic panel element, the page never loads and the error prints to the console.
If I default all the panels to expanded and have no dynamic elements, my site works with the latest version.
What is the expected behavior?
Before upgrade from
survey-react@1.0.60
, my site worked fine with collapsed panels and dynamic panels.How would you reproduce the current behavior (if this is a bug)?
create a survey using either a panel defaulting to collapsed, or a dynamic panel element.
Specify your