sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

onListViewUpdated and onExecute don't function properly in SPFx extensions

Open hamedy opened this issue 7 years ago • 12 comments

Category

  • [ ] Question
  • [ ] Typo
  • [x] Bug
  • [ ] Additional article idea

Expected or Desired Behavior

no matter how an item gets selected, the onListViewUpdated callback should be triggered with the current selected item passed through the event parameter.

also the onExecute function should have the current selected item in the event parameter.

Observed Behavior

-from the second time and on when you select an item, onListViewUpdated is not triggered unless if the selection is done through the radio button. If you just click on a row the callback is not triggered.

-when you change your selection in anyway but through the radio button, when you click the extension button, the event parameter in onExecute contains the very fist item that was selected and not the current one.

So for example opening the context menu (which would select the item too) and clicking on the extension button would not trigger the onListViewUpdated from second time and on and onExecute will have the wrong item in event parameter.

I hope I'm doing something wrong, otherwise it's beyond me how this could not have been discovered in testing. We have deliveries for out customers soon and this would definitely put a stop to the whole project! We have flows and azure functions and an entire solution that all depends on this functionality to start the process. Should be able to get the selected item reliably.

Looking forward to an answer and hopefully a solution. Hamed

hamedy avatar Oct 28 '19 11:10 hamedy

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

msft-github-bot avatar Oct 28 '19 11:10 msft-github-bot

I have exactly the same issue. onListViewUpdated method is not called if I have already selected an element and I select another one by clicking outside the checkbox, on the columns.

mrcpgn avatar Oct 28 '19 13:10 mrcpgn

Same issue on a client's tenant for me. Made for a less than fun bug hunt when issues were reported from testing.

Env: SPO - General Release SPFx: 1.9.1

CPritch avatar Oct 29 '19 11:10 CPritch

so we tried to work around this issue by rendering buttons on each row which would get a reference to current item and call a flow but then this happened: https://github.com/SharePoint/sp-dev-docs/issues/4656 onRenderCell not triggered on a random subset of items depending on how fast you scroll. We're basically stuck.

hamedy avatar Oct 29 '19 11:10 hamedy

Sound like the same issue I'm having on SPO (with SPFx generator 1.9.1)

  • Works as expected first time (can select via any method: click anywhere in the row, right click etc)
  • After that the radio button MUST be used to select a different row or the onExecute() event just returns the first selected item (OR the last item that was selected with the radio button)

yeahgoodthanks avatar Oct 30 '19 06:10 yeahgoodthanks

I think this is the same issue as described in #4769

ltdu avatar Oct 31 '19 10:10 ltdu

@andrewconnell can you try to escalate this issue please? We've suggested our customers to invest a lot to migrate from classic to modern because of better performance and SPFx customization possibilities and now we're looking like a fool since nothing works properly and project is on hold!

hamedy avatar Nov 12 '19 08:11 hamedy

Yeah, exact same boat as @hamedy for us. We are currently trying to release an ISO management library and quite rightly our client is terrified of the wrong documents being actioned.

CPritch avatar Nov 12 '19 09:11 CPritch

@VesaJuvonen can you please try to help us on this one? We have this issue in production environment, from more than 15 days. We have already opened premier support case (n. 17517628). Thank you in advance for your work.

PeppeDotNet avatar Nov 13 '19 09:11 PeppeDotNet

@PeppeDotNet the fix will be deployed soon. See https://github.com/SharePoint/sp-dev-docs/issues/4769#issuecomment-553021803

LukasNespor avatar Nov 13 '19 09:11 LukasNespor

DIdn't see this one... as this was submitted after #4769, this is technically a dupe so I'll close it. Please follow the other issue for status updates

andrewconnell avatar Nov 13 '19 10:11 andrewconnell

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

msft-github-bot avatar Jan 23 '20 06:01 msft-github-bot