Thanks for all the replies, so I finally found an application for currying, your advice was really useful!
This week I have been working on getting pagination working on a list of lists represented as tables that might have thousands and thousands of results.
So querying the server with page number and page size was key to getting it all working.
Users will select a list in a table to display the results within that list as another table and should be able to paginate.
get_list_curry = function (list_id) {
return (search_params) => {
return new Promise(
function (resolve, reject) {
numbersProvider.get({id: list_id}, {}, (data) => {
list = data;
resolve();
});
}
);
};
};
//...
let paginate = get_list_curry(list_id);
paginate({pageNumber: 1, pageSize: 25});
paginate({pageNumber: 2, pageSize: 50});
paginate({pageNumber: 3, pageSize: 75});
Thanks for the replies.
Aled
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thanks for all the replies, so I finally found an application for currying, your advice was really useful!
This week I have been working on getting pagination working on a list of lists represented as tables that might have thousands and thousands of results.
So querying the server with page number and page size was key to getting it all working.
Users will select a list in a table to display the results within that list as another table and should be able to paginate.
Thanks for the replies.
Aled