selectedRows is null on initial run of _onListViewStateChanged #10100
Labels
sharepoint-developer-support
sharepoint-developer-support
type:bug-confirmed
Confirmed bug, not working as designed / expected.
type:bug-suspected
Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.
Target SharePoint environment
SharePoint Online
What SharePoint development model, framework, SDK or API is this about?
💥 SharePoint Framework
Developer environment
Windows
What browser(s) / client(s) have you tested
Additional environment details
Describe the bug / error
I'm building a List View Command Set extension
When the page is loaded my, and my
_onListViewStateChanged(....)
function is run for the first time, thethis.context.listView.selefctedRows
isundefined
, rather than an empty array, this change seemingly happened over night.Steps to reproduce
Once you create a new List View Command Set extension the
_onListViewStateChanged
is added automatically, flip the logic as such:compareOneCommand.visible = this.context.listView.selectedRows.length === 0
and you should observe the behaviourExpected behavior
this.context.listView.selectedRows
should be an empty array if no rows are selected, even upon the first run.The text was updated successfully, but these errors were encountered: