Get form data other than onChange event

We are looking for an option to getData() of the jsonform other than onChange handler.

Currently we are using onChange handler dealing with array of objects of 10+ impacts the performance of the overall application.

Without onChange handler, we find the application performance is much better. But on the final submit we need the updated form data.

Can someone help us with a set of example. Thanks in advance.

Hi @PreethiJG,

JSON Forms takes advantage of React memos to increase performance. If the performance is good enough when not using onChange then it should also be good enough when using it. The reason is that we specifically have a check to prevent rerenderings when the onChange handler changes.

For the memo barriers to work you need to make sure to hand over the same schema, uischema, renderers etc. for each rerender call. If you construct any of these from scratch, then JSON Forms will notice that the props changed and potentially trigger a full rerender. This will then lead to the described performance problems.

Very likely you don’t hit this problematic case without the onChange as the parent component which renders JSON Forms does not rerender without it.

Can you show the code where you invoke JSON Forms?