-
-
Notifications
You must be signed in to change notification settings - Fork 248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Input huge delay #370
Comments
Hi @gemmi-arts. Is EDIT: Closed? Have you solved it? |
Hi @radekmie, |
@radekmie |
Hi, I know this issue is closed and I did not want to open a new one for the same problem. But I had a question in regards to input delay. I have a form that has dynamic fields, that I need to generate based on a condition, if a certain value has changed. The problem, is that, whenever I connect all these field and I type in the inputs, I get huge delays because it causes the form to re-render. I know that I can use onBlur instead of onChange on my fields in order to save on performance, but I was wondering, was there any other ways in approaching this issue? My current form has fields that depends on changes on other fields and will probably have more in the future and I just want ideas and best approach solutions for this issue. Hope you can guide me a little in how I should approach this. Thanks! |
Hi, @simplecommerce (unique nickname by the way :D). In general, uniforms are not heavy (hundreds of fields are OK, lists are a bit worse), because of heavy usage of |
@radekmie Hi, thanks (for the nickname) and the comment! I love your package and am using it to integrate with Apollo GraphQL for my forms, it works really well! I was wondering if you guys had a complete full example of a form that has quite a few fields and some that changes or renders based on input changes made to other fields? It would help a lot to see how you guys implement it vs what I am doing, so I know if its wrong or should be implemented differently. I am passing context using the example provided with It probably isn't the right way of using it, but I couldn't figure out any other way to do it to achieve what I wanted. For the moment, I am using Thanks for the help again! |
In this case, you may think about implementing |
@radekmie Thanks for your help! Another quick question, have you guys noticed that when using material-ui components, like the Grid layout inside the AutoForm, it impacts performance? Sorry I wasn't being clear, I am using Grid component from material-ui in AutoForm, and since they do not use shouldComponentUpdate, it always re-renders the Grid component and its children whenever a change is done within AutoForm fields. I noticed that you have a grid prop for fields but in your doc it says it only seems to support bootstrap. |
First thing: it's better not to use old issues for such conversations, as they're pinging too much, not really interested people. Second: in general, the old version of Material-UI was pretty heavy. Finally, no, it wasn't a problem in mine project, with any theme - updating the fields and/or views based on them was. EDIT: Yes, there's a |
Hi,
I have a serious problem that I don't know how to solve.
I got huge delay on my uniforms form inputs.
Here is info from DevTools:
[Violation] 'input' handler took 216ms
Here is example how it works:
https://streamable.com/c0npw
Did anyone have such a problem? I add that the form is big, about 20 fields.
Edit:
Problem with delay disappears when I remove model.
<AutoForm model={development} ...
The text was updated successfully, but these errors were encountered: