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
2
votes
2answers
47 views

how gulp serve related to sharepoint spfx webpart

I have created the sample spfx solution and uploaded it into the app catalog and i have added it to the site page. if I am changing in the local code and if I run the gulp serve the actual changes are ...
2
votes
1answer
113 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
2answers
1k 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
2k 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
2k views

How will SPFx on SharePoint-Online detect the language

Regional Settings in related SharePoint-Site? -- What about alternate activated languages? -- What about preferred language setting in user profile? So, who will win when opening a page with a ...
2
votes
1answer
546 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
470 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
4k 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
1answer
487 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
2k 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
668 views

Web part not available to add in the Workbench which is hosted on SharePoint Library

I am building my first SharePoint client-side web part (Hello World part 1). Everything works perfect no issues with the following. Successfully set up Machine with NodeJs, Gulp, Yeoman etc Got the ...
2
votes
2answers
28 views

What user permissions are required for the development of webparts in Sharepoint Framework?

As I am new to SharePoint Framework, I want to know what all user permissions are required for the development of web-parts in SharePoint Framework, along with web-part deployment in Microsoft Teams ...
2
votes
2answers
100 views

Remove the background of my Custom WebPart

Hope you can help me on this inquiry I am trying to removed the white background of my Custom webpart that I have created so that its background will depend on the section background when I check it ...
2
votes
2answers
58 views

SPFx. Error while importing modernizr in SPFx

I am new to SPFx and I am getting an error while trying to add jQuery and external JS in SPFX. Example my web-part name is FlipBookWebPart and I am trying to add turn.js and modernizr.js into the ...
2
votes
1answer
278 views

Use CKEditor in SharePoint spfx solution with React

We are trying to set up and use CKEditor5 with React in a SharePoint spfx solution (of course also React), but we are struggling with making it work as we would like. The Classic build of CKEditor5 ...
2
votes
1answer
957 views

How to Get Site-users and Site-groups in SPFx using PnP-JS?

How to get the site users and site groups in SPFx using PnP JS? Thanks in advance.
2
votes
1answer
46 views

Is there something like “View Customizer” in SPFx?

There is Tiles example on Github. But this is JSON Column Formatting. Is there a way to have more control above View rendering from SPFx web-part? I know field customizers can change behavior for ...
2
votes
1answer
832 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
2k 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
199 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
201 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
609 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
1k 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
1answer
752 views

How to make SPFx web part content searchable

I'm working on a Communications site, and I can't make content created in special custom editors (like the React Script Editor, or the React TinyMCE editor included in the sample web parts) searchable....
2
votes
2answers
2k 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
135 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
472 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
183 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
673 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 ...
2
votes
1answer
774 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
232 views

Retrieving data from rich text editor in spfx web part properties

I am currently creating a custom web part, the webpart is using PropertyFieldCollectionData to collect user data (https://sharepoint.github.io/sp-dev-fx-property-controls/controls/...
2
votes
3answers
191 views

Get information of employee from Employee ID in Sharepoint Framework(SPFX) using REST API

I am using Sharepoint Framework(SPFX) and using Typescript for calling REST APIs. I want to get information of other employees from Office 365 or Active Directory using their Email ID or Employee ID. ...
2
votes
1answer
67 views

SPFX: How to create an <img> tag containing the photo BLOB returned by MSGraph photo/$value

I'm creating somekind of custom Who-is-Who web part. After retrieving the Users information with MSGraphClient /users API I'm trying to retrieve and display the Photo for each employee. I'm having a ...
2
votes
1answer
336 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 ...
2
votes
2answers
8k views

Failed to execute 'json' on 'Response': body stream is locked

I am following this article and get the following error in the console.log Uncaught (in promise) TypeError: Failed to execute 'json' on 'Response': body stream is locked at e.json (sp-pages-...
2
votes
1answer
1k views

Add Dynamic Property Panes to SPFX

I know this has been asked 1000 times, but i've tried everything in the first 2 pages of google so i've decided to come to you guys for help. I'm trying to create some dynamically added property ...
2
votes
1answer
633 views

How to change state in webpart.tsx from wepart.ts property pane - SPFx

I am trying to add a button to my property pane that will pop up a modal where the user will be able to enter in an image to be displayed on my banner webpart which is just an image carousel. I ...
2
votes
1answer
70 views

Best Practice for Stylesheet If statements in SPFx

I'm starting to work with SPFx and have the following code: public render(): void { SPComponentLoader.loadCss('https://use.fontawesome.com/releases/v5.0.6/css/all.css'); var abc = (this.properties....
2
votes
2answers
897 views

Add external libraries in SPFx?

How to add external libraries like material-ui to our Spfx Webpart? I know to add external libraries having their CDN link and types definition like jquery but don't know how to add libraries which ...
2
votes
1answer
448 views

How to add SPFx client side webpart to MasterPage

I have a webpart that is developed using SharePoint Framework. This wepart should appear across the pages in the site collection. I know that we can add server side webparts in master page. How can we ...
2
votes
3answers
6k views

Customize master page on modern/communication site

I know that with the SharePoint Online publishing site we can develop a site where we can have the exact layout of my designed mock-up. So my question is will we be able to customize on some of the ...
2
votes
1answer
386 views

How to provisioning a SPFx web part using CSOM OnPrem (SP2016)

I have developed a SPFx web part. How do I provision the webpart part using CSOM to an OnPrem SharePoint 2016 server?
2
votes
1answer
1k views

SPFx - How to get current list Title in WebPart

I add my sharepoint framework webpart in AddForm.aspx page in my list. I want to get current list title. How to do this? When i use _spPageContextInfo i have following properties for list:
2
votes
1answer
267 views

SPFx package bundle issue

I was able to successfully build the package and deploy it to CDN and Sharepoint, it's working fine for the first release. If I want to update the typescript code to change my UI/logic and release a ...
2
votes
1answer
129 views

Is support for Angular 2 out for Modern UI?

I am interested in using office UI Fabric in SPFx client side webparts. But I would prefer using Angular 2 with a combination of Office UI Fabric. Is support for Office UI fabric along with Angular 2 ...
2
votes
1answer
811 views

How to include office ui fabric CSS font specifications

Since I updated my SPFx webpart today to > npm update: +-- @microsoft/sp-build-web@1.2.0 +-- @microsoft/sp-core-library@1.2.0 +-- @microsoft/sp-module-interfaces@1.2.0 +-- @microsoft/sp-webpart-...
2
votes
1answer
279 views

How to access custom properties for the Image Gallery web part?

I'm attempting to create a sharepoint page programatically by adding an image gallery web part. How do I access the properties of that web part? I don't see the documentation anywhere for Image ...
2
votes
1answer
706 views

React Patterns for displaying SharePoint Lists in a single page

I have been trying out a few of the spfx-dev-samples over the last week to test the whole React / Office fabric setup. Now if I wanted create a single web part / container to render the following ...
2
votes
2answers
1k views

Getting error in $.Get in SharePoint Framework

I have created following function in webpart.ts file to retrieve stock data from the Yahoo finance, protected demo():void{ var symbol='goog'; var url = 'http://query.yahooapis.com/v1/public/...
2
votes
1answer
467 views

Error while using gulp-spsync with SharePoint Framework

Reference article that I followed to upload files to SharePoint Library: Automate publishing of your SharePoint Framework scripts to Office 365 public CDN. I updated write-manifests.json with correct ...

1
3 4
5
6 7
18