Skip to content

ListViewCommand: event.selectedRows not updating #4769

@jordyvanbremen

Description

@jordyvanbremen

Category

  • Question
  • Typo
  • Bug
  • Additional article idea

Expected or Desired Behavior

Our ListViewCommand buttons are not working anymore. When selecting a specific item in a list and clicking our command button, at first there is no issue. When selecting another item in the list and then clicking the command button, event.selectedRows is still referring to the item that was selected initially. Only when I deselect an item before selecting another item, the selectedRows is showing the actual selected item. If I jump from Item 1 to Item 2 (without deselecting Item 1), selectedRows is not updated accordingly.

Observed Behavior

When selecting an item in the list, event.selectedRows should be updated accordingly.

Steps to Reproduce

  • Create a new ListView command extension
  • run gulp serve
  • select an item in the list (i.e. Item 1)
  • select another item in the list (i.e. Item 2)
  • check event.selectedRows (it refers to Item 1)

See also this video repro: https://1drv.ms/v/s!AqmJ4PFCanuAnehX6Szz_7IS4Up1KQ

I'm logging the selected item ID from the onExecute method.
image

my versions:
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:spfx-extensionsCategory: SharePoint Framework Extensionsstatus:fixedIssue was fixed in current or prior release.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions