-
-
Notifications
You must be signed in to change notification settings - Fork 209
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
Behavior change for data-ajax-update target #245
Comments
Finding the source of this issue took my 1-2 hours off, after updating X.PagedList. I could only find this page about the issue, after debugging jquery.unobtrusive-ajax.js and see it doesn't get "data-ajax-update". Oh... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
For the release 9.1.2, the parsing behavior of the UpdateTargetId in AjaxOptions (i.e. "data-ajax-update" for unobtrusive ajax) has been changed: Previously, one would only specify the ID without prepending a hash symbol.
With 9.1.2, this has been changed [1] so one now has to provide a full identifier with hash symbol ('#myid').
If the code is not updated like this, i.e. when somebody just bumps the package version, switching to a page different than "1" will simply do nothing.
This is considered an issue because:
Of course, without the change one can only choose update targets based on IDs and not based on classes, for instance. However, this will probably be used with IDs most of the time anyway. For arbitrary elements, one should IMO then also rename the property to e.g. just "UpdateTarget". This would also have the upside of creating compile time errors for this breaking change.
[1] 5c94faf#diff-09743ab05c132d0d41dc5ded4a73b8b81c59b378f6c8c6b5bd1c8d1b256d2ecbL13
Example call (before 9.1.2):
Example call (since 9.1.2):
Suggested resolution:
I will revert to 8.4.7 for now.
The text was updated successfully, but these errors were encountered: