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
I needed to make my select box dynamic based on a backbone collection (whenever created to use updated collection), for this reason instead of providing the collection directly I used the function callback feature.
In such a way:
the getCollection function retrieves a collection from global scope, or creates it if it does not exist, but does not fetch it.
If the collection was not previously fetched (is still empty) the select editor would not fetch it.
To fix that i edited the setOptions function in editors/select.js to call itself if function found in order to handle a returned collection.
FIX:
//when function is passed in setOptions function in editors/select.js line 71
else if (_.isFunction(options)) {
options(function(result) {
self.setOptions(result); // FIX call self in order to handle collections or even another function
}, self);
}
The text was updated successfully, but these errors were encountered:
I needed to make my select box dynamic based on a backbone collection (whenever created to use updated collection), for this reason instead of providing the collection directly I used the function callback feature.
In such a way:
the getCollection function retrieves a collection from global scope, or creates it if it does not exist, but does not fetch it.
If the collection was not previously fetched (is still empty) the select editor would not fetch it.
To fix that i edited the setOptions function in editors/select.js to call itself if function found in order to handle a returned collection.
FIX:
The text was updated successfully, but these errors were encountered: