Description
Category
[ ] Enhancement
[x] Bug
[ ] Question
Version
Please specify what version of the library you are using: [3.18.1]
We tested also with 3.20.0 but with the same result.
Expected / Desired Behavior / Question
We expect that the ListItemComments control shows all comments of a list item. As the documentation at https://pnp.github.io/sp-dev-fx-controls-react/controls/ListItemComments/ states: "User can scroll to load more comments if they exist (infinite scroll)"
Observed Behavior
The behavior is a bit strange but I will try to describe it as good as possible.
We tried to use the ListItemComments control for one of our apps where we considered SharePoint List Item Comments as useful. We noticed that when a list item in a SharePoint List has between 1-20 comments all is working fine. However, if the list item has >=21 comments and <=30 comments, only the last 20 comments are shown. In addition a huge whitespace is added to the end of the list of comments:
As soon as we add the 31st comment, all of the comments are shown with infinite scrolling and also that huge whitespace is gone in that case.
In addition some similar behavior happens starting with 41 comments. However, in this case I couldn't get it working again anymore (even with 60 comments they are cutoff and the huge whitespace is shown).
Steps to Reproduce
We are using the component like this:
<ListItemComments
listId={context.list.guid.toString()}
itemId={String(item.ID)}
serviceScope={context.serviceScope as any}
/>