Skip to content
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 - Dynamic Updates without Full Re-rendering #7295

Open
dxbykov opened this issue Mar 15, 2019 · 9 comments

Comments

Projects
None yet
7 participants
@dxbykov
Copy link
Contributor

commented Mar 15, 2019

The Problem

The Form widget re-renders all its items when you change their count or reconfigure an individual item.

The Proposed Solution

We will add the repaintChangesOnly option that specifies whether the widget should repaint only those items whose data or configuration changed.

let formOptions = {
    repaintChangesOnly: true
};

Note: The Form re-renders all its items if your updates cause significant changes to the layout.

Use Cases

The Form re-renders only an item whose options changed...

show and hide an item

... and newly added or removed items.

add and delete an item

Installation

Follow the installation guide from the release page and leave us feedback on this topic.

We Need Your Feedback

Please share with us your additional partial form update scenarios by commenting on this thread.

Take a Quick Poll

Do you find this Form enhancement useful?

Get Notified of Updates

Subscribe to this thread or to our Facebook and Twitter accounts for updates on this topic.

@pedrofurtado

This comment has been minimized.

Copy link
Contributor

commented Mar 19, 2019

That is a great news! 🎉

@Ryan-Ketcham

This comment has been minimized.

Copy link

commented Mar 19, 2019

In addition to showing/hiding fields based on values entered into other fields, we would also like to change validation rules on fields. As an example, if somebody entered their date of birth and said it is over 18, they would no longer have to add information for a Parent or Guardian. Right now we handle this validation with JavaScript, and to show/hide the fields we use CSS classes.

@pedrofurtado

This comment has been minimized.

Copy link
Contributor

commented Mar 19, 2019

@BingoRUS @dxbykov It will be good if the behavior of this component could replace libraries like these below:

Cocoon (Ruby on Rails) -> https://github.com/nathanvda/cocoon
Nova Repeatable Fields (Laravel) -> https://github.com/fourstacks/nova-repeatable-fields

@Shiko1st

This comment has been minimized.

Copy link

commented Mar 19, 2019

Great news!

What are "significant changes"?
Will it be possible to add / hide /show tabs or groups dynamically?

@jsdmitry

This comment has been minimized.

Copy link
Contributor

commented Mar 22, 2019

@Ryan-Ketcham Thank you for your feedback. This functionality has been fixed in #6433.
@pedrofurtado Thank you for your idea. We'll check this library.
@Shiko1st By significant layout changes, we mean changes that require re-positioning of existing items between rows and columns. At the same time, if you update an item(s) within a single only, this group will be re-rendered.

@george-kar

This comment has been minimized.

Copy link

commented Mar 24, 2019

That's was also a big issue for me and I can't wait for this update. Will be included on the 19.1 or we can expect it as update to the 18.x series ?

@dxbykov

This comment has been minimized.

Copy link
Contributor Author

commented Apr 2, 2019

Will be included on the 19.1 or we can expect it as update to the 18.x series ?

It won't be a part of 18.x. According to the current development state, I'm afraid we can't release it in 19.1 with the desired level of quality. It's at the top of our to-do list, so if it's not ready by 19.1 we'll release it later this year. Please bear with us.

@hakimio

This comment has been minimized.

Copy link

commented May 14, 2019

@dxbykov is this feature postponed until 19.2?

@dxbykov

This comment has been minimized.

Copy link
Contributor Author

commented May 15, 2019

Yes, we plan to release it in 19.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.