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
4answers
1k views

Add jQuery in Client Web part (SPFX)

I am following a tutorial from Microsoft docs and trying to import jQuery files into my client web part but getting error. https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/...
3
votes
3answers
498 views

SPFX- Array.prototype.diff - (TS) property “diff” does not exist on type 'any[]'- es6 issue?

I have some code that takes a SP List item column (a news article tagged to one or more choice categories) and want to show that to users who have a user profile property with one or more categories ...
3
votes
2answers
4k views

Get current user profile details in spfx

How to get current user profile details using plain Typescript in SharePoint framework. I am not using JSOM or csom.
3
votes
1answer
449 views

SharePoint framework property pane data

Where the data of SharePoint framework property pane is saved.? Can't we access it directly? Also if we have deleted a instance of our app from the page, the property pane data gets deleted ...
3
votes
3answers
3k views

A different version of this App is already installed with the same version number

This is the error message when I try to upload spfx webpart, nothing wrong webpart because I can upload it to new created site, but cant replace with existing one. how can I resolve this?
3
votes
3answers
1k views

How I can upload a App from Sharepoint Framework?

I am trying to upload a app generate with SharePoint Framework to the App Catalog of my SharePoint, but when I upload it, it don't recognize how a valid package and I can't add this app to my ...
3
votes
1answer
2k views

Passing a property to a child component

I am continuing to learn about the various frameworks we can use with SPFX. I have stumbled upon a problem, which according to various websites out there it should work, so I'm sure the problem is a ...
3
votes
1answer
2k views

Creating a custom Property Pane Field

I'm trying to create a custom property pane field to allow the user to configure a list and then a list view to be used by the web part. I followed the instructions of this Custom field example ...
3
votes
2answers
143 views

How to combine two SPFx web parts?

We have two separate SPFx web parts (call them A and B), and you can add A and/or B to same SharePoint Online site. Now there is a need to create web part C that combines both A and B into single web ...
3
votes
1answer
142 views

SPFx Developement Environment Setup issue

I am facing critical issue in setting up development environment for SPFx. I have refereed following link Link: https://docs.microsoft.com/en-us/sharepoint/dev/spfx/set-up-your-development-...
3
votes
1answer
518 views

How to inject jquery sharepoint services to spfx

We are trying to inject jquery sharepoint services dependency to our sharepoint framework webpart. This is what we did. First added external files at config.json "externals": { "jQuery": { //"...
3
votes
2answers
534 views

Is that possible to add SPFX webpart App at toplevel and access the webpart in all subsites?

My clients want my SPFX web part in many sub sites. For this, I have to add the app to each subsite. Is there a way to add the SPFX web part app at the top level and I should be able to add web part ...
3
votes
2answers
716 views

SPFX Client WebPart with Angularjs and OfficeUiFabric

Iam strugling to use OfficeUIFbric in my Client WebPart with AngularJS. I first created the webpart as "No javaScript web framework", and then i added angularJS as described in this article , webpart ...
3
votes
3answers
2k views

Adding custom list to SharePoint framework app - SPFx app

I want to add list, site column, content type etc to a SharePoint framework app using may be yeoman generator or anything else, i know it might be achieved by API calls but i want to add like the way ...
3
votes
1answer
47 views

New Webpart development in SharePoint 2013

I need to develop some new web parts for SharePoint 2013, and they should be developed in such a way that they can be easily migrated to SharePoint Online at a later point. The webparts need to ...
3
votes
2answers
754 views

force user to add metadata when uploading docs

I want that my users are forced to enter metadata when they upload/bulk upload document.When bulk uploading document it would be cool that users add the metadata once and it applies to all the files
3
votes
1answer
52 views

Updating a webpart - Which gulp commands do I need to be running?

I have a couple webparts locally hosted for my SPO environment. I'm using a Team Site Library to host the "temp" files and the .sppkg file is hosted through the App catalog. When I want to make an ...
3
votes
2answers
573 views

Extending jQuery in SPFx Web Part

I've used the jQuery plugin jOrgChart with success in a SharePoint add-in by simply referencing the file and making the call, i.e. <script type="text/javascript" src="jquery.jOrgChart.js"></...
3
votes
1answer
2k views

SPFx - Office UI React - How to default select user in People Picker

I want to set default selected Item on people picker? <NormalPeoplePicker defaultSelectedItems={()} inputProps={{ disabled: true }} onChange={this._onChangePeoplePicker} ...
3
votes
1answer
495 views

Any Api's to get Last Opened Documents

Do we have any Apis to get the Last Opened Documents That is displayed in the the Office 365 Home Page. Intention is to get the list of the last opened Documents using SpFx webpart.
3
votes
2answers
402 views

SharePoint spfx webpart Property 'value' does not exist. sub task errored

I am trying to fetch data from SharePoint in spfx web part with No javascript framework. I am able to access the list and getting the response object but not able to access the value from the response ...
3
votes
1answer
539 views

SPFx - How to start workflow on list?

Do I want to start workflow where send an email with a new framework of SharePoint? Is it true that I can not start a workflow? What should I use? SPServices library JSOM PnP? Thank you ...
3
votes
1answer
656 views

Get SharePoint List Items using SharePoint Framework React

I am getting SharePoint list items using framework react with following code: Developing SharePoint Framework Web Parts Using ReactJS import * as React from 'react'; import { css } from 'office-ui-...
3
votes
1answer
991 views

“[serve] The api entry could not be loaded” in SharePoint Framework(SPFX)

SPFX webpart created successfully but when I run gulp serve command I get error. Error : [serve] The api entry could not be loaded: node_modules/@microsoft/sp-webpart-workbench/lib/api/ -- Node.js ...
3
votes
1answer
566 views

Running Microsoft Flow from a SharePoint Framework (SPFx) web part

i have created a Request/Response MS Flow to send email, when i try to call it via Postman i am getting following error. InvalidTemplate. Unable to process template language expressions in action '...
3
votes
1answer
258 views

how to install api(youtube-api-search ) in spfx&React project created by yeoman-generator

I created my project wth yeoman template generator; yo @microsoft/sharepoint command(react choosen as JS framework). than installed youtube search api npm install youtube-api-search so far ...
3
votes
1answer
79 views

Creating component in SPFx webpart from command line

Is there any way to generate component in React from command line (similar to Angular's ng generate)?
3
votes
2answers
361 views

Load SPFX webparts only after application customizer init method is completed ?

I have some webparts who have dependency of data which is obtained from application customizer. Is it possible to load webparts after application customizer
3
votes
1answer
996 views

Office-UI-Fabric-react uncheck checbox

How Can I uncheck a checkbox dynamically from the code? I need to uncheck some checkboxes at the same time from the code when I press a button. I'm using: SharePoint Framework - Typescript - Office ...
3
votes
2answers
807 views

Custom webpart (spfx) not listed in app gallery

I created an app catalog and a developer site Then I uploaded the SpFX Webpart package But the Webpart is not listed in the app gallery of my developer site so I can't use the web part. Any tips?
3
votes
1answer
118 views

SPFx 'Field Customizer' puts restrictions on CSS ??

In the SPFx video at Buid17 there is an example for the new (JSLink/CSR replacement) "Field Customizer" blurring sensitive information They use MouseEvents (and more code) to swap a whole DIV ...
3
votes
1answer
110 views

react-aad-implicitflow works only in workbench

I am having issues with ADAL login, so I grabbed the latest version of react-aad-implicitflow and tested it out. I modified the client id be the same I was using, deployed and tested a few ...
3
votes
2answers
575 views

SharePoint Framework: Module not loaded correctly when pressing F5 in IE

I need to load the jquery-typeahead library in my SPFx web part. I register this dependency by adding it to "config\config.json" like this: "externals": { "jquery": { "path": "./...
3
votes
2answers
2k views

Sharepoint Framework (Drop 6): How to load external css in a WebPart

I am fairly new to the SharePoint Framework development stack and am building a WebPart with AngularJS 1.x and ngOfficeUIFabric. I'm using the current drop (Sharepoint Framework Developer Preview ...
3
votes
1answer
42 views

PnPJS - MS Graph API - how to get group photo

I am using PnPJS for MS Graph API to retrieve groups information in SPFx solution. I am able to get the groups information properly. I need to get the group photo also, since photo is not available ...
3
votes
1answer
429 views

How to display the SharePoint “Live Persona Card”?

In our SharePoint Framework web parts we want to show people information just like SharePoint does: When hovering over the name or image of somebody a popup like this should open. Looking at the ...
3
votes
1answer
2k views

SPFx problem with code from github

I'm trying to use the CDB promoted links webpart (from github) for modern pages but I need to make changes to the code (just the colours, nothing structural), So far so good- runs on the workbench but ...
3
votes
2answers
3k views

How to customize width and hieght of Dialog component of Office UI fabric in SPFX webparts

I need a Office UI fabric dialog component of 600 by 600 px in SPFX webpart. Tried className and containerClassName attributes both didn't work. The style attribute doesn't. The max-width is set to ...
3
votes
1answer
2k views

How do I disable trailing-comma tslint rule in SPFx scaffolding?

I ran the current Yeoman SharePoint generator, and got the following ts-lint file in the config directory (with a few minor tweaks added). From what I can tell the trailing-comma rule should be ...
3
votes
1answer
685 views

Possible to show/hide SPFx web parts available in web part toolbox?

I have created an SPFx web part, deployed it, and added it to a page. I want to restrict other end users' ability to add the same web part to other pages. It's not a security thing, it's a tech ...
3
votes
2answers
314 views

SPFx Creating custom sectionlayout

Is it possible to create a modern UI section layout? e.g. a tab layout
3
votes
1answer
1k views

How to enable Async/Wait in SPFx Typescript, tslint: Missing semicolon, TS1005: ',' expected, TS2304: Cannot find name 'await'

I am trying to use async / await for developing a SPFx WebPart. The sample react-async-await-sp-pnp-js in sp-dev-fx-webparts compiles and runs fine on my computer. When I try to use async / await, ...
3
votes
1answer
1k views

SPFx how to set a people field in a list, e.g. “convert” AccountName to Lookup ID?

I am trying to build an SPFx WebPart with React Office UI Fabric. I have a SharePoint list with a People field called AssignedTo. The lookup ID values are like 12, 20, and so on. When I select a ...
3
votes
2answers
2k views

How to use PeoplePicker and TaxonomyPicker Controls with SPFX?

I am trying to develop a simple form using the new SharePoint Framework. The form requires PeoplePicker and TaxonomyPicker controls. I couldn't find any documentation on how to use these with the new ...
3
votes
1answer
127 views

Get User's Time Zone using PnPJs

We are trying to retreive current user's profile Time Zone SPS-TimeZone from a SharePoint Framework webpart, but we are faicing an error (see below). Does anyone know about the best/most effecient way ...
3
votes
2answers
1k views

Office UI Fabric DetailsList(React) rendering: DetailsColumn.render() error

I am trying to add a very basic implementation of the Office UI Fabric's DetailsList React component to my project, but keep on getting the following error when trying to render it: 'DetailsColumn....
3
votes
1answer
574 views

SPFX and react-router

I'm having trouble getting react-router working on my SharePoint Web Part with React and TypeScript. I have tried react-router as a standalone webapp and it works fine. Just can't get it working on ...
3
votes
1answer
1k views

Display a SPFx web part within a popup on a modern page

I am looking for a way to display an SPFx web part within a pop-window in a way, similar to using the modal window ( as descrbed here: https://www.ericgregorich.com/blog/2013/12/30/open-a-page-in-a-...
3
votes
0answers
347 views

SharePoint Framework error : Resource “jquery” not found in loader configuration of manifest for component

I know that this question has already been there, but am raising it because after trying all blogs issue did not get resolved. Am trying to load non-AMD module having dependency on AMD module. Since ...
3
votes
2answers
200 views

Deploy selected webpart in SPFx Webpart Solution

We have created an SPFx webpart solution and it contains 5 web parts in it. 3 out of 5 web parts are related to one client and rest 2 web parts are related to another client. now I want to deploy this ...