Skip to content

Command Set: context.listView.columns contains a list of columns from different views/lists after navigation between pages #1242

@AJIXuMuK

Description

@AJIXuMuK

Category

  • Question
  • Typo
  • Bug
  • Additional article idea

Expected or Desired Behavior

If a user navigates between pages context.listView.columns contains a list of columns for current view

Observed Behavior

If a user navigates between pages context.listView.columns contains a list of columns from ALL views that were visited since last page refresh.

Steps to Reproduce

  1. Create a simple Command Set
  2. Change onExecute code to log items from context.listView.columns in console:
console.log(this.context.listView.columns.map(c => c.field.displayName));
  1. Add FeatureFramework elements.xml to register the command set for lists
  2. add feature to package-solution.json
  3. package your solution
  4. deploy the solution to App Catalog and install on the site
  5. Create multiple lists with different columns and display the links to them in Quick Launch
  6. Navigate to one of the lists, open browser console and click the Command Set button
  7. EXPECTED/OBSERVED: console contains a list of the columns for current view
  8. Navigate to other list using Quick Launch, open browser console and click the Command Set button
  9. EXPECTED: console contains a list of the columns for current view. OBSERVED: console contains a list of the columns from previous list view and current view.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:spfxCategory: SharePoint Framework (not extensions related)status:fixed-next-dropIssue planned to be fixed in an upcoming release.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions