For searching through messaging extensions, there is a huge list of items for my query.
For initialRun of the query, I am getting
queryOptions: {
skip: 0,
count:25
}
So, my questions are,
- Can I manipulate these queryOptions for initialRun?
- Can I update these queryOptions with each search response of messaging extension?
- If #1 and #2 are not possible then is there any way through which I may achieve behavior like lazy loading items onScroll of the messaging extension result?
- Are there any other alternatives for paginating the result data in messaging extension?
- For question 1 and 2: We cannot manipulate queryOptions for such
scenarios.
- For question 3: Messaging extension doesn't have onScroll or any such property and that cannot be done.
- For question 4: You can handle it in your code manually and set how many items you want to show initially and how many when you
search something. When messaging extension is run initially, query
parameter name is set to "initialRun". So you can handle it using
parameters name.
EDIT: Adding code snippet for reference :
if (query.Parameters[0].Name == "initialRun")
{
// Write the code handling number of results to be return.
}
else
{
// Write the code handling number of results to be return when user search.
}