Questions tagged [spfx-webparts]

Technical questions about building and using web parts based on the SharePoint Framework client-side development model.

Filter by
Sorted by
Tagged with
3
votes
1answer
270 views

Is it possible to have Skype Integration using SPFx React Webpart

I am working on Skype Integration With SPFx React webpart in Office 365. I tried to refer below URL http://www.sharepointcolumn.com/lync-presence-indicators-code-snippets-in-sharepoint-2013/ but ...
3
votes
1answer
2k views

VS Code : Breakpoint ignored because generated code not found (source map problem?)

I am trying to debug my SharePoint Framework web part in VS code using the Chrome Debugger extension but I am getting error message as Breakpoint ignored because generated code not found. Also in ...
3
votes
1answer
285 views

SPFx Custom Property Pane

I had created a SPFx web part. The web part contains a Property Pane Custom Field, which returns a string. Now, when I hit apply button on property pane, my custom property gets the data and render it ...
3
votes
0answers
74 views

SPFx WebPart and Variations - App is not working

I have developed a SharePoint SPFx App that is using a CDN hosted in SP for the resources. Everything is working fine on normal websites and sites but not on variation sites. So I can install the ...
3
votes
1answer
217 views

Properties of SharePoint framework web part

How to get all the associated properties of Web part in SharePoint framework?
3
votes
0answers
637 views

SPFx Custom Property Pane save property save

When building a SharePoint Framework web part - How to Save Custom Property Pane value? I have created a multiselect field for Property Pane, but not able to retain the values when refresh the page. ...
3
votes
1answer
89 views

Can I get a trace of TypeScript statements executed in a SharePoint SPFx client web part?

Is there a way with gulp serve to get a trace of TypeScript statements that are executed in a SPFx client application ?
2
votes
2answers
3k views

use jquery functions within spfx webpart

I need to use jquery in my webpart function, remote jquery lib added from cdn; SPComponentLoader.loadCss('https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js'); and this is my simple ...
2
votes
2answers
825 views

Typescript errors in SharePoint Framework webparts

I created a new sharePoint framework webpart using the msdn link https://dev.office.com/sharepoint/docs/spfx/web-parts/get-started/build-a-hello-world-web-part After Executing the gulp serve ...
2
votes
1answer
3k views

SPFX: How to add item in SharePoint list with attachment?

I have created a SPFX webpart to add item in list with attachment. How to add item with attachment ?
2
votes
2answers
762 views

How to make a POST call to Microsoft Graph in SPFx (using MSGraphClient)?

I have difficulties to find code samples of POST calls, using the MSGraphClient. The only one I find is using the already deprecated graphHTTPClient ( https://docs.microsoft.com/en-us/sharepoint/dev/...
2
votes
1answer
2k views

SharePoint framework with classic view

Can we use SharePoint framework web-part with classic view (I.e. with Our custom Master pages and Page Layouts)? SharePoint framework is only to use it with our Modern view.? Or to use it with both ...
2
votes
3answers
1k views

Can we customize Materpage and layouts with SPFx?

I am working on SharePoint Framework and have one take to do in this. I want to know that can we add our custom master page and page layouts in SharePoint Online using the SharePoint Framework? If ...
2
votes
2answers
517 views

Can a user update a SharePoint list using SPFx without the user having access to the list?

In C# you could allow users to access a SharePoint list they have no access to by using SPSecurity.RunWithElevatedPrivileges(delegate () .....etc. Is there a way achieving the same functionality ...
2
votes
2answers
733 views

Deploying a SPFx webpart to multiple tenants without public cdn

We have developed a SharePoint Framework webpart and deployed the bundle files to our private CDN and the app package to our app catalog in SharePoint Online which are located in same tenant in which ...
2
votes
3answers
2k views

Cannot test SPFX webparts on my SharePoint tenancy

I am using the SPFX and I have created my webpart using SPFX and gulp serve is running on my development machine but when I try and test the web part on my tenancy I get this error message : Your ...
2
votes
1answer
252 views

SPFX 1.7.1 - Full page apps - How to configure

So i've been away from SPFX for a while since they were still using the older version of React and i've got a question. I can see that they added a developer preview of "Full Page apps". How can you ...
2
votes
1answer
1k views

How to dynamically bind value (Options) to Dropdown - Office UI Fabric React Components

I'm using Office UI Fabric React dropdown in my spfx webpart. I have added static options in that dropdown as below, but I want to bind options dynamically which i'm getting from REST api. <...
2
votes
1answer
508 views

How to apply a theme to a spfx web part?

I have a spfx web part the gets and displays list items. I'm not sure how to apply a theme to this web part so that the font type and style of the web part title and list items match the rest of the ...
2
votes
1answer
654 views

Script to add SPFx webpart to a classic page using PnP Powershell

I have to run a Powershell script that creates a Site Collection App catalog , then add an SPFx webpart to it and publish it. Also it has to install it in the site. I have done upto this part. Last ...
2
votes
1answer
172 views

Restrict audience for SharePoint Framework Solutions

Is it possible to restrict the audience for SharePoint Framework solutions? By individual sites or users. Deploying solutions to the app catalog make them available tenant-wide, but some solutions ...
2
votes
1answer
202 views

Supported scenario to have web part *and* assets in one SharePoint Framework package?

Expected behavior Going by the tutorials I would expect to be able to make a package that contains some assets, like a list, as well as at least one web part - all in the same package. Observed ...
2
votes
2answers
4k views

Referencing custom JavaScript files in SharePoint framework

How to reference a custom JavaScript file in SharePoint framework project. I have created "Assets" folder, and my Custom js file is inside this folder. I can see that several articles have explained ...
2
votes
1answer
1k views

How do we attach a hover event to a fabric DetailsList in an SPFX webpart?

How do we attach a hover event to a fabric DetailsList in an SPFX web part? I have a list of documents in a spfx web part displayed in a fabric DetailsList. When a user hovers over an item I want to ...
2
votes
3answers
2k views

SharePoint Framework and workbench.aspx

I'm trying out the SharePoint Framework and am following the setup instructions. I've downloaded and uploaded to my site workbench.aspx. When I go to "preview the web part in SharePoint" and load the ...
2
votes
1answer
48 views

Get list of alerts of the current user from the whole site collection

My scenario: i want to create a spfx web part that uses a rest API that will query all the alerts throughout the whole site collection for the current user. I want to know which API to use and ...
2
votes
1answer
438 views

Add files to subfolders using rest api in javascript

What is working right now is i can upload to the root folder of a library using the code below : myDropzone.options.url = `${_context.pageContext.web.absoluteUrl}/_api/web/Lists/getById('${_parent....
2
votes
1answer
447 views

spfx context undefined

in my react component i use msgraph but i get the message "cannot read property 'context' of undefined" My code: this.context.msGraphClientFactory .getClient() .then((client: ...
2
votes
1answer
975 views

How to get App Catalog site URL using JavaScript?

Is there a way to programmatically get the App Catalog site URL in a SharePoint Framework (SPFx) Web Part? I'd like to read/set the SharePoint Tenant Properties in my Web Part. However, we need to ...
2
votes
1answer
316 views

How to add items to SPO list synchronously in spfx webparts?

I have twelve items that need to be added to a list on button click. I am using the sp-pnp-js library to add items. But the function adds items to the list asynchronously. I have tried many ways. ...
2
votes
1answer
351 views

SPFX - Target Audiences

what do you know about target audiences in Spfx modern pages or webparts? i have been searching information about this, but I'm still in blank. Thank you !
2
votes
1answer
375 views

SPFX - PnP JS Core for SPFx On-Premise v1.0.2

I want to use PnP JS Core in SPFx v1.0.2 React webpart for SP16 On-premise server . What is the version of pnp need to use and how to install it? What are the other options for accessing data in ...
2
votes
3answers
2k views

webpack “Module not found: Error: Cannot resolve 'file' or 'directory”

I successfully followed and executed 6 of the 7 SPX tutorials. In the last one "Document Card Example", I get the following error during build: [16:20:50] Starting subtask 'configure-webpack'... [16:...
2
votes
3answers
2k views

SharePoint Framework (GA): how to prevent rewriting of CSS class names?

SharePoint Framework currently takes my .scss files and changes all class names by adding IDs like this: floatRight_789b4d6f. I understand this is done to isolate the styling within the web part but ...
2
votes
1answer
384 views

@microsoft/sp-loader install fails with install script error

I'm trying to create SharePoint Framework hello world project as mentioned in tutorial. But it fails in the end with error npm ERR! @microsoft/sp-loader@1.0.0 install: node npm-install-script.js. ...
2
votes
1answer
785 views

Spfx Delete item from list

I delete last inserted item from list with this method below; private deleteItem(): void { if (!window.confirm('Are you sure you want to delete the latest item?')) { return; } this....
2
votes
1answer
60 views

spfx office fabric ui CSS is not working

I just now upgraded SPFX from 1.7.1 to 1.8.2. I have referred office fabric UI css class like ms-grid, ms-GridRow, ms-u-md6 etc... before upgrading everything is working fine. But know office fabric ...
2
votes
1answer
66 views

MS Graph API - Problems on SPO Mobile-App

The Background: I am developing Sharepoint Online Webparts on-demand. Sometimes the functionality of these Webparts include the use of Microsoft's "Graph-API" to access Data regarding Office 365 ...
2
votes
1answer
134 views

Rest API to update a library item giving 400 error

The code am using: pnp.sp.web.getFolderByServerRelativeUrl("Shared%20Documents").files.getByName("test.jpg").getItem().then(item => { item.update({ Title: "A Title", ...
2
votes
1answer
331 views

Can I use a SPFX ListView Command Extension to copy files from another library?

I'm looking at using the ListView Command SharePoint Framework Extension on a SharePoint document library. Essentially all it will do is have one command called "New Project". On selecting the ...
2
votes
1answer
3k views

SharePoint Online full-width page

I am still exploring SharePoint Online creating webparts and deploying through visual studio code using Typescript. I created a HelloWorld webpart and uploaded it on page. I was able to create ...
2
votes
1answer
539 views

Modify/Access webpart properties in SharePoint Framework (Spfx)

I am trying to saving some value in the Web part properties. I know in Spfx you can save or update any value in webpart property like this.properties.myProp = "newValue"; I am using angular ...
2
votes
2answers
1k views

PageContextInfo: Page Context is undefined in sharepoint framework (Webpart)

I am trying to upgrade an old sharepoint project to the latest sharepoint framework. The client part is built with angular. As in spfx _spPageContextInfo is not available so I tired changing the code ...
2
votes
1answer
129 views

SharePoint Online: Guidance on using “classic” UI libraries in “modern” experience

Are classic APIs like SP.UI.Notify.addNotification supposed to be used in the modern experience of SharePoint Online or are they deprecated? Is there documentation about this anywhere? ...
2
votes
1answer
324 views

SPFX - SP.UI.Notifications.addNotifcation not available?

I've created a webpart using SPFX GA. In the externals section of the config.json I've added the following from the layouts folder. init.js microsoftajax.js sp.runtime.js sp.js sp.ui.dialog.js ...
2
votes
1answer
172 views

Webpack Error when running “gulp serve” for basic Hello World webpart

I am getting the following error when running "gulp serve" command after scaffolding the basic Hello World web-part project. I have installed the latest versions of Node LTS v6.9.5 and TypeScript 2.1....
2
votes
2answers
473 views

Does SPFx have special access to REST endpoints?

In the latest SPFx video https://www.youtube.com/watch?v=6r6MqUDzKvI The SPFX Wizard explains how to add an escape function Quoting the SPFx Wizard: "Escape the value for any characters that are ...
2
votes
1answer
538 views

How can I 'bundle' a json file into a SharePoint Framework webpart?

I have a large block of JSON I need to be available in my webpart, a 'canned' search result used when in the workbench and not connected to SharePoint. Ideally I would like to reference it as follows:...
2
votes
1answer
413 views

Create document set with REST API in SharePoint Framework

I'm looking for a way to create a document set in my document library from within SPFx web part. I'm using @microsoft/sp-http module to create HTTP requests. Do I need to manually create some ...
2
votes
1answer
70 views

SPFX and React : Component not rendering correctly because of findDOMNode returns null

I am a new React learner, and I may have a situation with render() and findDOMNode. What I have and what is the wrong behavior : I'm quite new to React so, I may have done lots of mistakes there. I ...