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

Add View and List information into Command Set and Field Customizer contexts

Open AJIXuMuK opened this issue 7 years ago • 9 comments

Category

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

Expected or Desired Behavior

List and view information is available in Command Set and Field Customizer context (at least listId, viewId)

Observed Behavior

There is no way to get the information in Command Set and Field Customizer. That issue was not so critical while extensions were not available in Document Library and List web parts. But now, when we can have multiple lists per page, there is no way (even hack or workaround) to get list and view info in the extensions.

It's pretty critical for any customization that rely on additional data about list and/or view. The simplest example: Command Set is registered for both document libraries and lists. In the code I want to know the context - if the Command Set is rendered for Doc Lib, or list.

Steps to Reproduce

Look at Command Set and Field Customizer APIs.

AJIXuMuK avatar Feb 04 '19 19:02 AJIXuMuK

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

msft-github-bot avatar Feb 04 '19 19:02 msft-github-bot

I totally agree.

We have several extensions to lists and libraries. When customers place the list and library webpart on a modern page there is no way for our extensions to know which list the extension is running for.

The best thing for us would be if IListViewCommandSetExecuteEventParameters could be extended with ListId and possible ViewId

The next best thing would be if this.context.pageContext.list would be updated as soon as the user interacts with a list/library webpart'.

I filed this on userVoice: https://sharepoint.uservoice.com/forums/329220-sharepoint-dev-platform/suggestions/36938845-ilistviewcommandsetexecuteeventparameters-spfx-cur

magnusdanielson avatar Feb 23 '19 23:02 magnusdanielson

Hello, Any updates/dates on this one? Thanks!

AJIXuMuK avatar May 28 '19 19:05 AJIXuMuK

This is a real struggle if we use the lists relative Url as well. If running our CommandSet on the dedicated List page, this works as expected, but the relative Url of the list is lost if the CommandSet is running in a web part on a Modern Site Page.

MortenGuldbaek avatar Aug 09 '19 09:08 MortenGuldbaek

@AJIXuMuK - Thanks for raising the concern.

Yes, that seems like an issue and we will look into this issue. However, we're currently working on other higher priority items. We will get to this one, according to its priority.

This is now being tracked internally.

srideshpande avatar Sep 30 '19 21:09 srideshpande

Any news on this issue?

jklevel avatar Jan 14 '20 10:01 jklevel

Anything to report on this issue? It has been open for nearly two years at this point.

LastGunslinger avatar Nov 30 '20 22:11 LastGunslinger

We are discussing the long term / broad direction of this in this discussion - https://github.com/SharePoint/sp-dev-docs/discussions/7375

patmill avatar Oct 07 '21 18:10 patmill

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

ghost avatar Nov 03 '21 06:11 ghost