BUG: first reported in two tenants yesterday
Description
When scolling down a long list and selecting an item, the CommandSet is not picking up the selected rows from the event. It is intermittent but can be replicated after a few attempts.
event.selectedRows.length is returning 0 despite rows being selected.
Seems to be a problem as you scroll down the list and items load dynamically. Worked fine for months until this week and confirmed on twitter by other developers.
To Replicate:
Follow the guide here to create a commandset: https://docs.microsoft.com/en-us/sharepoint/dev/spfx/extensions/get-started/building-simple-cmdset-with-dialog-api
Before this line:
switch (event.itemId) {
Add this line
alert(event.selectedRows.length)
When running it from the top of the page you will get an alert with the number of rows. When scolling down the page, you will only get 0 returned.
Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.
@patmill To make you aware of this issue 馃憤
More tenants are also having this issue:
https://twitter.com/Tonyp543212003/status/1149601933398663171
Got it, thanks. I'll forward this to the relevant team.
I have a customer facing this issue as of this week, and I have been able to reproduce the problem in my test tenant by doing the following:
UPDATE: After a little more testing I can now workaround the issue (up to at least 100 items) by increasing the view Item Limit setting to 100. Conversely reducing the limit to e.g, 20 makes the problem happen earlier.
Hope that helps!
Great tip @martinlaukkanen, that workaround helped for our tenants too. This isn't ideal though, as some point we will hit the 5000 item limit of a view.
It is hard to replicate (sometimes it works and others it doesn't so Microsoft closed my support case) but I hope a MS developer sees this and fixes the problem.
Hi @CloudDesignBox - we've had a dev digging into this alongside the updated list logic rollout. They are unable to reproduce this with the changes pushed through the service in the past month or two. Can you see if the problem is still reproducible on your side? Thanks.
@patmill I don't seem to be able to replicate this. It was intermittent before but the workaround was to set the view item limit to 4999 so that it didnt load on demand. I've tried this on 30 items in the view and scrolling down, didnt get the error this time. Thanks for looking.
Issues that have been closed & had no follow-up activity for at least 7 days are automatically locked. Please refer to our wiki for more details, including how to remediate this action if you feel this was done prematurely or in error: Issue List: Our approach to locked issues
Most helpful comment
Great tip @martinlaukkanen, that workaround helped for our tenants too. This isn't ideal though, as some point we will hit the 5000 item limit of a view.
It is hard to replicate (sometimes it works and others it doesn't so Microsoft closed my support case) but I hope a MS developer sees this and fixes the problem.