10
votes
How does one pass parameters to SharePoint Framework Extensions in practice?
Using Properties in Your Extension
The this.properties property of your extension are defined by the Interface you setup. By default, the interface gets defined in your main extension class file.
...
9
votes
Accepted
Can SPFx Webpart and Extension exist in a single app?
Yes, you can have multiple webparts or extensions in the same solution. Think of it as a Visual Studio solution with multiple projects (i.e one sln file and multiple dlls).
To add a webpart/extension ...
9
votes
Using Office Fabric UI icons in a SPFx extension
This is currrently a SPFx limitation. You cannot directly use Fabric UI Icons as command set icons in SPFx list extension.
Currently SPFx extension allows you only 2 ways to set extension icon,
1) ...
9
votes
Accepted
What is difference between SharePoint Framework (SPFx) Extensions and SharePoint Framework (SPFx) Web PART
Web parts allow you to create components that can be added by content editors as content on a page. Extensions add functionality to known areas of pages on an entire site or site collection, for ...
8
votes
Accepted
Does Virus affected Node Modules transfer in Contents of SPFx deployment package
TLDR;
The short answer is no, the package doesn't contain all of the code from node_modules, yet it contains some very small amount of proven code (mostly css-loader code from corresponding ...
8
votes
Accepted
_spPageContextInfo in modern pages
Try using below solutions:
Solution 1:
Use legacyPageContext to access the pageContext information:
// This is how you can access the page context info
this.context.pageContext.legacyPageContext;
/...
7
votes
Can I target an existing column with a Field Customizer extension in SharePoint Framework?
This is possible by associating FieldCustomizer to existing field. Field object has ClientSideComponentId property, which should be updated to match the identifier of the FieldCustomizer manifest ID. ...
7
votes
Accepted
SharePoint Framework (SPFX) onInit() Promises
Batching the 2 requests as suggested by Venkat Konjeti is a great idea, but the question of how to delay your render until these are finished is demonstrated in the jquery-application-toastr sample (...
7
votes
Accepted
SPFx Extension - Page Context is missing
No its not removed or deprecated. Its working correctly . Just upgraded a sample and was able to work with the this.context object without any issue.
You need to ensure that you are using it inside ...
7
votes
Accepted
SPO updates impact on SPFX components
Disclaimer - I don't work for Microsoft and cannot officially speak on their behalf. However, I do work closely with the engineering team and am very familiar with SPFx and long term plans.
SPFx ...
6
votes
Accepted
How to tell if page is in view/edit mode in SPFx?
The correct answer is valid but it will not cover all the scenarios, if you need to detect the edit mode from an SPFx solution on a classic page the Mode=Edit will not be available.
A more reliable ...
6
votes
Accepted
How to update ListView within spfx commandset to show new item
There is a Microsoft sample project on github that does exactly the same. Looking at their code, it does mention that there is currently no way to refresh just the list view and their solution seems ...
5
votes
Accepted
SPFX - Listview command - Get current folder
SPFx has some utility classes to help you get the folder url. Its not available in pageContextInfo or any other page property. However, you can split it from the query string's Id parameter.
Add the ...
5
votes
SPFX - Listview command - Get current folder
It is pretty easy. Because you know which item is selected, you know url of the file. event.selectedRows[0] holds a lot of information about the selected item. Or you can use query string.
@override
...
5
votes
Accepted
SharePoint Online SPFx Apps: Why use a CDN for assets, why not simply use the SiteAssets library?
The tutorials configure a library or folder in a Doc Lib as CDN because of the immense performance benefits that are gained once it is enabled.
In our tenants, post enabling of CDNs, we saw a ...
5
votes
Accepted
NodeJS not compatible
You can use nvm (node version manager) to quickly switch between different nodejs versions. Download for windows or OSX version.
How to use
Install nvm
$ nvm install 8.11.0 - installs nodejs ...
5
votes
Accepted
Getting warning messages : Warning - [sass] The local CSS class 'min-chart' is not camelCase and will not be type-safe
Resolution
You should either fix all warnings or if it's not possible, you can ignore them.
For that purpose, you should modify your gulpfile.js.
There is one out of the box build suppression method ...
4
votes
Deployed app customizer sppkg doesn't show up in site collection's app catalog
Just answering my own question - turns out I had the "skipFeatureDeployment" set to true in my package-solution file here. Feature deployment is required when packaging SPFx app customisers via the ...
4
votes
Accepted
How does one pass parameters to SharePoint Framework Extensions in practice?
theChrisKent's answer set me on the right track, but as I noted in my comment on his answer, I was really looking for something that could be used from a web interface (such as a client side webpart), ...
4
votes
Accepted
bootstrap menu dropdown not working with SPFX -extensions
1) If you are adding jquery & bootstrap via CDN, no need to npm install them
2) bootstap components depend on jQuery. So, you need to first load jQuery and then bootstrap js. You can specify the ...
4
votes
Getting Teams Context information in SharePoint Framework extensions
Interestingly I found the way to get Teams Context information in SPFx extension. Follow the below steps to do it:
Do "npm install @microsoft/teams-js --save" in your SPFx extension project.
In your ....
4
votes
SharePoint framework yo not showing all the options
You have to select "SharePoint Online only (latest)" or "SharePoint 2019 onwards, including SharePoint Online" for the question Which baseline packages do you want to target for your component(s)? to ...
4
votes
Accepted
Restrict Sharepoint extension to be used on one specific list
You can get the list name in code using this.context.pageContext.list.title and compare it with your list title as given below:
public onListViewUpdated(event: ...
3
votes
How to tell if page is in view/edit mode in SPFx?
When the modern page is in edit mode. you can find there will be query string added on the url Mode=Edit. if you remove that query string the page will go in read mode. you can get query string values ...
3
votes
Is there any alternative of model-dialog available for SharePoint Modern Page?
Update:
Based on this, numerous customization options are not supported in the modern list/library like jslink field and view customization, custom css via alternate css url, custom masterpages, ...
3
votes
Accepted
SPFX Extension ListView - nothing happens after "loading debug scripts"
Recently, SPFx extensions have moved from preview to RC. So, this has introduced some breaking changes for extensions. MS has deprecated onRefreshCommand method and suggested that you use the ...
3
votes
Can I target an existing column with a Field Customizer extension in SharePoint Framework?
As Vesa suggested, you can update the existing site column 'StockAvailable' property "ClientSideComponentId" by using pnp powershell.
Set-PnPField -Identity 'StockAvailable' -Values @{...
3
votes
Accepted
How to get Share URL from command set?
To get the Share URL, you can use any of the 3 approaches mentioned below:
Option 1 - using ServerRedirectedEmbedUrl
You can make use the ServerRedirectedEmbedUrl to get the URL as below:
event....
3
votes
Accepted
Sharepoint Online/O365 custom fonts
As you know, the officiel Theme Palette is quite limited concerning customization of your site.
I've personally been using SharePoint Framework to customize it's appearing.
When you make a SPFx ...
3
votes
Accepted
SPFX Field Customizer: how to get full path of document in document library?
You can use event.listItem.getValueByName("FileRef") to get the path of the document in library. This will give you a server relative URL of the file in the document library.
If you want to have an ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
spfx-extensions × 336spfx × 252
sharepoint-online × 207
spfx-webparts × 59
modern-experience × 33
applicationcustomizers × 20
listviewcommandset × 20
react × 15
spfx-tooling × 15
typescript × 13
sharepoint-server × 12
2019 × 11
list × 10
sharepoint-framework × 10
development × 9
pnpjs × 9
javascript × 8
css × 8
pnp × 8
fieldcustomizers × 7
document-library × 6
office-365 × 6
error × 6
deployment × 6
custom-actions × 6