Antd handles the problem of very large forms

for example, in a very large form, each form item item is wrapped by getFieldDecorator, because the onChange event of the wrapped input component triggers the forceUpdate, on the Form.create layer, so the whole form will be re-render
at this time, if it is the Input component that triggers the onChange event, it will obviously start stuttering

.

the easiest way here is to split the form into several components. Put a separate Form.create, on each component to prevent the entire form from being re-render.
also find an antd-react-form-builder, to see that readme has solved part of the problem, but it has not been used in detail

.

excuse me, is there any other way?

Mar.01,2021
Is the

problem solved?


you can add debounce, to onchange, but there will be problems with form verification


keep forgetting the question I asked

later, our processing method is very simple. We put another layer on top of each form item component to detect whether the form item needs to be changed, and ensure that if value does not have change, the form item will not be rerender

.

of course, when there are a lot of items in the list, you can still feel stutter, but you can stand it

.
  • Antd pro table page

    1. After filtering the antd pro table list display page, click the header query button. The data is all data, but the selection in the filter box is still there. How to remove it 2, [full check data display] [] [] ...

Menu