Skip to content

Commit

Permalink
Fix the build
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewtelnov committed Sep 14, 2017
1 parent 1061919 commit 0c23ebc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ export class Base {
private arrayOnPush = {};
protected isLoadingFromJsonValue: boolean = false;
public onPropertyChanged: Event<(sender: Base, options: any) => any, any> = new Event<(sender: Base, options: any) => any, any>();
setPropertyValueCoreHandler: (propertiesHash: any, name: string, val: any) => void;
public constructor() {
CustomPropertiesCollection.createProperties(this);
}
Expand Down Expand Up @@ -186,7 +187,8 @@ export class Base {
return res;
}
protected setPropertyValueCore(propertiesHash: any, name: string, val: any) {
propertiesHash[name] = val;
if(this.setPropertyValueCoreHandler) this.setPropertyValueCoreHandler(propertiesHash, name, val);
else propertiesHash[name] = val;
}
/**
* set property value
Expand Down
8 changes: 8 additions & 0 deletions src/vue/surveyModel.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Vue from 'vue';
import {SurveyModel} from "../survey";
import {IQuestion} from "../base";
import {surveyCss} from "../defaultCss/cssstandard";

export class VueSurveyModel extends SurveyModel {
Expand Down Expand Up @@ -27,4 +28,11 @@ export class VueSurveyModel extends SurveyModel {
protected setPropertyValueCore(propertiesHash: any, name: string, val: any) {
Vue.set(propertiesHash, name, val);
}
questionAdded(question: IQuestion, index: number, parentPanel: any, rootPanel: any) {
var q: any; q = question;
q.setPropertyValueCoreHandler = function(propertiesHash: any, name: string, val: any) {
Vue.set(propertiesHash, name, val);
};
super.questionAdded(question, index, parentPanel, rootPanel);
}
}

0 comments on commit 0c23ebc

Please sign in to comment.