Sp-dev-docs: Updated Webpart Title of Provider webpart not reflecting in the Source List of Consumer webpart

Created on 4 Jul 2019  路  11Comments  路  Source: SharePoint/sp-dev-docs

Category

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

Could you please suggest how to get the updated webpart Title of Provider webpart in to Consumer webpart. Below are the snapshots of sample webpart, I would like to get the "Upcoming Events" name in the Consumer webpart source list not "Events" (which is coming now from manifest file.).

Provider Webpart Title Name:

image

Consumer Webpart Source List:

image

This scenario would be helpful if I'm adding more than one instance of same webpart on the page and want to get different data from different instances.Also It is working fine with SharePoint OOB webparts. Please share your thoughts. Thanks!

spfx-general answered question uservoice-request

Most helpful comment

If I read this correctly, you are wanting some basic properties (like the webpart title) to be exposed via dynamic data, is that correct? If so, that would be a feature request, and the best thing would be to open a request in uservoice (https://sharepoint.uservoice.com/forums/329220-sharepoint-dev-platform)

All 11 comments

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

The value shown in the Connect to source selector in the consumer is reflecting the title of the web part that is providing data. In this case, the title of the web part was set to "Events".

Where is "Upcoming events" coming from in the provider?

"Upcoming events " is coming from the webpart properties provided in the manifest file (EventsWebPart.manifest.json)

image
In my project also, I'm using Pnp spfx webpart title control which allows to change the webpart title in edit mode. How can i get the updated webpart title in Connect To Source selector of Consumer webpart, not the default one given in the manifest file.
Let me know in case more information required , Thanks !

Ah... ok so you've created a custom property title that's not the same as the web part title property. The property pane is going to show the actual web part title... not the custom property you've created.

Ok..then how the OOB webparts are exposing their webpart title in case of dynamic data. I just added one oob list webpart and able to get the updated webpart tile in the source List of Consumer webpart.

Just selected one list from oob list webpart and update its title. Same title get reflected in the consumer source list. Is there any other way to expose it?

image

image

Sorry, I'm not understanding what you're saying in your last reply. Can you be more descriptive with your repro steps so I can try to repro on my side?

We are using Pnp spfx webpart title control to render webpart title in our custom spfx webparts. I understood that this is not same as webpart default title property.
However I'm just thinking how to get that pnp webpart title in my Source list of Consumer webpart as it is a custom property. Do you have any sample code for the same or any idea that pnp support its webpart title dynamic connection?

If I read this correctly, you are wanting some basic properties (like the webpart title) to be exposed via dynamic data, is that correct? If so, that would be a feature request, and the best thing would be to open a request in uservoice (https://sharepoint.uservoice.com/forums/329220-sharepoint-dev-platform)

Only the default web part's Title property is provided in the dynamic data connection as you've seen. Additional fields aren't provided to the selector in the consumer's property pane... so this would be a feature request as @patmill said.

Closing issue as "answered". If you encounter similar issue(s), please open up a NEW issue. Thank you.

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mikeparkie picture mikeparkie  路  3Comments

SteIvanov picture SteIvanov  路  3Comments

StfBauer picture StfBauer  路  3Comments

jonthenerd picture jonthenerd  路  3Comments

christianbueschi picture christianbueschi  路  3Comments