January 7, 2021

[Issue Resolved]: Default value of custom property in SPFx web part Property pane is not showing while running in Workbench Mode

Issue:

When we set the default value of custom property in the SPFx web part, it is not getting displayed in the Property pane while code is running in the Workbench mode (debug mode).

As shown below, We've set the default value of "SharePoint Training Custom List Name" custom property as "Training", but it is not displaying in the property pane while code is running mode.





Solution:

When we do any changes in “webpart.manifest” file, it will not reflect directly in the web part if it is in running mode.

To resolve this issue, please follow the below steps:

  • Stop the project execution if it is in running mode.
  • Re-build the project solution and re-run the project.
  • To rebuild the project please run the below-mentioned command respectively:
    • gulp clean
    • gulp build
    • gulp serve
  • Navigate to the SharePoint Workbench. Remove the existing web part from the page and add it again to reflect the changes.
  • Now, you will be able to see the default value of the custom property which we added for the "SharePoint Training Custom List Name" property in the property pane.






If you have any questions you can reach out to our SharePoint Consulting team here.

No comments:

Post a Comment