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

fix: refresh form section while refreshing the field #13355

Merged
merged 1 commit into from May 28, 2021

Conversation

leela
Copy link
Contributor

@leela leela commented May 28, 2021

If all the fields with in a section has depends_on property and in such
case section itself stays hidden as all fields with in it are hidden.

Currently when any form field is updated, we are refreshing only the
fields but not the sections. So, field refresh is not affecting the form
because of section being hidden.

Fix is to refresh the sections when ever form fields are refreshed.

You can find this happening for Share Transfer doctype where Equity/liability Account and Asset account are fields of an accounts section has depends_on property (account section won't show up even after company field is populated).
image

If all the fields with in a section has depends_on property and in such
case section itself stays hidden as all fields with in it are hidden.

Currently when any form field is updated, we are refreshing only the
fields but not the sections. So, field refresh is not affecting the form
because of section being hidden.

Fix is to refresh the sections when ever form fields are refreshed.
@leela
Copy link
Contributor Author

leela commented May 28, 2021

@Mergifyio backport version-13-hotfix develop

@mergify
Copy link
Contributor

mergify bot commented May 28, 2021

Command backport version-13-hotfix develop: pending

Waiting for the pull request to get merged

@mergify
Copy link
Contributor

mergify bot commented May 28, 2021

Command backport version-13-hotfix develop: success

Backports have been created

leela added a commit that referenced this pull request May 31, 2021
fix: refresh form section while refreshing the field (backport #13355)
leela added a commit that referenced this pull request May 31, 2021
…-13355

fix: refresh form section while refreshing the field (backport #13355)
@ankush
Copy link
Member

ankush commented Jun 24, 2021

@leela can we undo this or find a better fix?

This calls reset on dashboard and removes all custom sections whenever any field is refreshed.

// clear custom
this.parent.find('.custom').remove();
this.hide();

Screenshot 2021-06-24 at 1 33 20 PM

@noahjacob

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants