Skip to content

Commit d348456

Browse files
committed
Update renderer FormInstance data on every change
And expose functions to get data and schema from the instance.
1 parent b9f71fa commit d348456

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/renderer.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ export function FormInstance(config) {
2828
};
2929

3030
this.onChange = function(e) {
31+
this.data = e.data;
32+
3133
if (!this.eventListeners)
3234
return;
3335

@@ -68,6 +70,14 @@ export function FormInstance(config) {
6870

6971
this.render();
7072
};
73+
74+
this.getSchema = function() {
75+
return this.schema;
76+
};
77+
78+
this.getData = function() {
79+
return this.data;
80+
};
7181
}
7282

7383

0 commit comments

Comments
 (0)