You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 4, 2021. It is now read-only.
I had a problem of models in a pageble collection not being able tofetch or calling the destroy function. We set a url function to the model by default, however models in a pageable collection have a string as url. In the end I did find the cause.
On line 1170 it sets the options url, this is set as a string if you had a function it would have been converted to string above.
var url = options.url || this.url || "";
if (_isFunction(url)) url = url.call(this);
var qsi = url.indexOf('?');
if (qsi != -1) {
_extend(data, queryStringToParams(url.slice(qsi + 1)));
url = url.slice(0, qsi);
}
options.url = url;
options.data = data;
This doesn't cause any problems in the collection object itself, but the options are passed along when creating the childmodels resulting in the url being overridden.
Now my question is if there is a reason it has to be passed along? Since backbone fetch itself also gets the url, without placing it in the options.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I had a problem of models in a pageble collection not being able tofetch or calling the destroy function. We set a url function to the model by default, however models in a pageable collection have a string as url. In the end I did find the cause.
On line 1170 it sets the options url, this is set as a string if you had a function it would have been converted to string above.
This doesn't cause any problems in the collection object itself, but the options are passed along when creating the childmodels resulting in the url being overridden.
Now my question is if there is a reason it has to be passed along? Since backbone fetch itself also gets the url, without placing it in the options.
The text was updated successfully, but these errors were encountered: