-
Notifications
You must be signed in to change notification settings - Fork 415
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
Form#setSchema helper method to allow dynamic updating of schema #274
Comments
I'd really prefer it if I could insert or remove fields with methods, which essentially calls createField internally and append or remove from the container. Rerendering is a no go on mobile. I don't thinks people would want the screen to be jumping around, losing focus to field but the keyboard is still hanging around etc as soon as I've picked a value from a select box. The way I do it currently is to override the Form#render method and #initialize to listen to couple of key change events, the resulting code is quite nasty. |
Let's move discussion about this use case back to #273. I opened this issue for other use cases where you plan on re-rendering the form anyway (when it's not currently visible) but want to update the schema first. |
Current workaround in the case where you want to take an existing form instance, tweak the schema, and re-display it:
I'm not sure if calling |
Hi! Has anyone found an answer to this problem ? |
form.initialize(); works fine |
I've needed to dynamically change a form schema and then re-render the form.
Right now you can say:
form.schema = newSchema
but then
form.fieldsets
,form.selectedFields
, etc. get out-of-date and have to also be re-set manually.I'd propose adding a
setSchema
helper method toForm
to make this nicer.The text was updated successfully, but these errors were encountered: