-
Notifications
You must be signed in to change notification settings - Fork 38
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
Don't trigger unload protect when initializing resources #3774
Conversation
@CarolineDenis Here are the lines in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if it's helpful, but you can make a field change not trigger a save blocker by adding silent: true
:
specify7/specifyweb/frontend/js_src/lib/components/DataModel/treeBusinessRules.ts
Line 13 in 39cb18c
? void resource.set('isAccepted', true, { silent: true }) |
This was the very first thing I tried, but does not quite cover every case. specify7/specifyweb/frontend/js_src/lib/components/DataModel/resourceApi.js Lines 349 to 352 in 22c79e9
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Working as expected. Can now navigate Browse in Forms
from query builder and stats query without unload protect dialog.
Screen.Recording.2023-07-14.at.9.54.40.AM.mov
- macOS, chrome,
uoregonpaleo
Let's merge this tomorrow. |
Addresses #3259 (comment)
This was caused because of changes related to Business Rules.
Beforehand, we were not triggering the Backbone
change
event for business rules while the resource was being fetched or saved by Backbone. I have restored this functionality.This has probably not solved the underlying cause of #3259 in its entirety, but should prevent business rules from triggering unload protect while the record is being loaded.
To test:
Navigate to an existing Determination record which has
taxon
data.The Save Button should be disabled, and when navigating away from the Determination in a record set, the unload protect dialog should not be displayed.