Hi
I have a problem in sorting an observable array in my model. The problem is I have different models and with each model I dont know where my observable array is. I added a "extend" processing option so it is applied to any property name called "m" and "m" is my observable array I want to sort. Depending on the model I pass "m" could be in a different path. Sorting works only the first time when initialising, but with new incoming updates (from signalr) my observable array does not sort
var mappingOptions = {
extend: {
"m": function (markets) {
markets.sort(viewModel.marketSorter);
return markets;
}
};
I don't know what processing option (or else) I can use to sort the array when data is updated.
Hi I have a problem in sorting an observable array in my model. The problem is I have different models and with each model I dont know where my observable array is. I added a "extend" processing option so it is applied to any property name called "m" and "m" is my observable array I want to sort. Depending on the model I pass "m" could be in a different path. Sorting works only the first time when initialising, but with new incoming updates (from signalr) my observable array does not sort
I don't know what processing option (or else) I can use to sort the array when data is updated.