Skip to content

Commit

Permalink
Merge pull request #521 from anvilistas/routing-stale-form-load
Browse files Browse the repository at this point in the history
routing - fix stale form load
  • Loading branch information
meatballs authored Mar 26, 2024
2 parents 6070842 + 05d23b1 commit bac039f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
https://github.com/anvilistas/anvil-extras/issues/513
* switch - fix lever color when switch is checked
https://github.com/anvilistas/anvil-extras/pull/517
* routing - fix on_form_load might fire stale value if form_show event is slow
https://github.com/anvilistas/anvil-extras/discussions/521

## Minor Changes
* designer hints - add some designer hints to components
Expand Down
2 changes: 2 additions & 0 deletions client_code/routing/_router.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,8 @@ def navigate(url_hash=None, url_pattern=None, url_dict=None, **properties):
_current_form = form
update_form_attrs(form)
add_form_to_container(form)
# if the form_show was slow don't fire the on_form_load callback
nav_context.check_stale()
alert_form_loaded(form=form, **url_args)


Expand Down

0 comments on commit bac039f

Please sign in to comment.