Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect context.listView.list when navigating to another list using quick launch menu (ListView Command Set) #9953

Open
3 of 9 tasks
SPJS opened this issue Oct 6, 2024 · 1 comment
Labels
Needs: Triage 🔍 Awaiting categorization and initial review. type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.

Comments

@SPJS
Copy link

SPJS commented Oct 6, 2024

Target SharePoint environment

SharePoint Online

What SharePoint development model, framework, SDK or API is this about?

💥 SharePoint Framework

Developer environment

None

What browser(s) / client(s) have you tested

  • 💥 Internet Explorer
  • 💥 Microsoft Edge
  • 💥 Google Chrome
  • 💥 FireFox
  • 💥 Safari
  • mobile (iOS/iPadOS)
  • mobile (Android)
  • not applicable
  • other (enter in the "Additional environment details" area below)

Additional environment details

  • Chrome: Version 129.0.6668.90 (Official Build) (64-bit)
  • Edge: Version 129.0.2792.79 (Official build) (64-bit)
  • SPFx version: 1.17.4

Describe the bug / error

When a SharePoint list is using the updated UI experience the this.context.listView object is not updated when you navigate to another list using the quick launch menu.

Initial page load with List_A and click on Command Two button:
image

Changed to List_B and clicked the Command Two button:
image

Steps to reproduce

  1. Create the default hello-world Command Set SPFx: https://learn.microsoft.com/en-us/sharepoint/dev/spfx/extensions/get-started/building-simple-cmdset-with-dialog-api
  2. Change the Dialog.alert for “COMMAND_2” to output this.context.listView.list.title and add console.log(this.context.listView.list)
  3. Open a list view and click the “Command Two” button. You should see the correct information.
  4. Navigate to another list in the same site using the quick launch menu.
  5. Click the “Command Two” button and it will show the previous list title in the dialog and log the other list context to the console.
  6. Refresh the page while in the new list view and the context will be correct.

Changed alert and added console.log in hello-world command set extension
image

Expected behavior

The context object should reflect the list currently shown in the browser.

@reedpamsft
Copy link
Contributor

@SPJS thanks! I think we have a fix for this issue which is in the progress of rolling out, but I'll double-check.

@VesaJuvonen VesaJuvonen added the Needs: Triage 🔍 Awaiting categorization and initial review. label Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs: Triage 🔍 Awaiting categorization and initial review. type:bug-suspected Suspected bug (not working as designed/expected). See “type:bug-confirmed” for confirmed bugs.
Projects
None yet
Development

No branches or pull requests

3 participants