Hi everyone,
I have create a page to display a list of job requests.
The page only able to display 15 of items, if more than it, it will require user to scroll down to see the other items.
Currently, the list is rendered by using knockoutjs foreach syntax, when user click on "more result" button, it will create another request to server for more records.
When the result came back, it will append into existing array using code below:
$.each(newResult, function (index, item) {
self.jobrequests.push(item);
});
The problem:
After finish append into existing observable array, user screen will scroll to the top of the page.
I suspect it is because the "foreach" syntax re-render the whole list.
Is there a better solution than creating a new foreach custom binding?
Thanks