surveyjs / custom-widgets

The collection of custom widgets for SurveyJS: Survey Library and Survey Creator :package:
https://surveyjs.io
MIT License
80 stars 78 forks source link

Changing locale throws error _this.widgetJson.willUnmount is not a function #245

Open somnath157 opened 3 years ago

somnath157 commented 3 years ago

versions ng: 8.3.19 survey-angular: 1.8.3 surveyjs-widgets: 1.8.3

I am facing this issue when changing the locale of survey. when i change the locale of the survey website hang up and continues console error saying _this.widgetJson.willUnmount is not a function can be seen. it occurs at line "this.survey.locale = this._locale;"

 @Input() title: string;
  _locale;
  selectedLocale: string;
  @Input('locale')
  set locale(value: string) {
    this._locale = value;
    if (this.survey) {
      this.survey.locale = this._locale;
      Survey.SurveyNG.render(this.surveyElement.nativeElement, {
        model: this.survey,
        onValidateQuestion: this.surveyValidateQuestion
      });
    }
  }
tsv2013 commented 3 years ago

Could you provide us a minimal sample to reproduce the issue?