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
1
vote
1answer
1k views

Cascading dropdown list in SPFx web part

Can someone help me with this issue as I would like to create cascading dropdown lists inside the web part itself and not in the property pane. I have found this code in [github react-...
0
votes
0answers
7 views

Build Microsoft Teams tab using SharePoint Framework SPFx not working on mobile device

I'm creating my first Microsoft Teams app using SPFx. Here is the tutorial I followed: https://docs.microsoft.com/en-us/microsoftteams/platform/get-started/first-app-spfx?tabs=cli The app seems to ...
0
votes
1answer
25 views

Deploying Calendar list using SPFx

I am trying to create a calendar list using SPFx feature framework. Am able to create custom list with content types but Calendar list is not getting created. XML for fields <Field ID="{...
1
vote
1answer
25 views

SPFX webpart shows at r is not a constructor error randomly

I frequently get the above error in my dashboard page which consist of few spfx webparts. This error appears randomly 1 in 10 times, The spfx webparts do not consume any pnp framework or jquery nor it ...
0
votes
0answers
11 views

SPFx webpart at times never loads

My Spfx webpart which is just getting one line data from the list using pnp just keeps loading at times, when refreshed it comes back to normal again, but at times this just keeps on loading and ...
0
votes
1answer
21 views

SharePoint SPFx dealing with lookup field

My problem is that when I get the value of the lookup field ('Attachment') its retrieved as an array and I don't know how to deal with it, I mean how do I get the values inside this array, so any ...
0
votes
1answer
14 views

Is there a RSS Feed web part for a SharePoint modern page - Communications site

Is there a RSS web part for SharePoint online - comms site? If there is none, is there any way I can display RSS feed on a comms site?
0
votes
1answer
7 views

Argument of type '10' is not assignable to parameter of type 'CanvasColumnFactor'

Why we cannot create a page section with the configuration of two columns with the first one filling the 2 of the 12 column of the layout and the second column filling 10 of the 12 column of layout. ...
0
votes
1answer
865 views

Getting "Access token validation failure. Invalid audience" for Aad application in spfx

I have created one AAD application with below configuration and trying to access the Graph APIs added in the AAD application using SPFx SPFx configuration and code: Error: Please suggest if I am ...
0
votes
0answers
9 views

SPFX - Injecting custom javascript at runtime from property pane field

How is it that libraries like StratusForms are able to provide property panes for users to write custom javascript on the fly at runtime and inject that into the page? I don't understand the ...
0
votes
1answer
837 views

SPHttpClient undefined error: Using React JS to add item in SharePoint list

I'm trying to add an item in SharePoint Online list using SPFx solution where I'm using React JS to perform the action. Below is the copied code, when debugging it says that: "VM242:1 Uncaught ...
1
vote
1answer
1k views

Getting SharePoint news using rest API in SharePoint Online

Is there any rest API available to get the recent updates or news related to a site in SharePoint Online? How To Read The SharePoint News Using Rest API In SPFx I have found above post but it does ...
0
votes
0answers
7 views

how to detect if the current spfx webpart has the classic properties pane opened

I am trying to set one of the webpart properties from the property pane dynamically via JS. The ways mentioned in many articles works well for modern pages. If I set the property directly the SPFX ...
0
votes
1answer
42 views

Updating a list in SharePoint framework - SPFx WebPart

I have followed this tutorial and this documentation in order to create lists and columns within SharePoint Online. Everything seems to work fine when creating them for the first time. But when I try ...
0
votes
1answer
19 views

How to upgrade dependency packages which have vulnerabilities

In our company we use veracode to scan our code and this tool give us a summary report at the end with the vulnerabilities found on our source code or dependencies. I have created a new SPFx webpart, ...
0
votes
1answer
980 views

Angular 2 Routing in SharePoint Framework - SPFX

Using Angular.IO site's Routing example , I created a simple SPFX webpart with two components Dashboard and HeroDetails. When I try to run it through SharePoint site I see following error. Attaching ...
4
votes
1answer
2k views

How can I force SPFX webpart to not show cached data in SharePoint online

I have created a SPFx webpart which reads parameters from page URL query strings and renders data accordingly. After the page is loaded and I press back button and again access the page with ...
2
votes
1answer
2k views

how to use react-bootstrap in SPFx webpart

installing react-bootstrap straightforward; "npm install react-bootstrap --save" and "npm install @types/react-bootstrap --save" then add references import FooButton from 'react-bootstrap/...
0
votes
0answers
32 views

SPFX Image Map webpart - Only updates after browser refresh

I will prefix this question with that I am relatively new to SPFX development I have created a react webpart utilising the react-img-mapper , I collect the MAP data from some ...
0
votes
1answer
29 views

SPFX webpart not added to site after deployment

I have developed a SPFx WebPart using react. When packaging this solution, I use the following commands: gulp clean gulp bundle --ship gulp package-solution --ship FYI, I'm using these options in my ...
0
votes
1answer
858 views

SPFx app not showing up in the webpart list

As I am new to SharePoint Framework, I am trying to update an existing web-part (updated the version in package-solution.json). Updated .sppkg file in app catalog (overwrite), shows new version number....
1
vote
1answer
21 views

SharePoint rest API for updating a site pages library item

I need to update a filed in the Site pages library using rest API. I tried with axios and spHttpClient & spHttpResponse, but it's not working. Is there any sharepoint rest API for updating an item ...
0
votes
1answer
1k views

SPFX create and use an array

As a newbie to SPFx, how do I create and use an array? everything I've tried fails to populate the array. let CustomerList: Array<any> = ['1', '2', '3']; let array1: any = ["Panda", "Zebra", "...
0
votes
1answer
1k views

How to retrieve Image column from SharePoint list using React js SPFx

I am trying below TypeScript to retrieve the Image column using SPFx .Unfortunately image is not rendering on page. Please help me on this.
1
vote
1answer
835 views

API POST Call "Failed To Fetch"

API Post call returns "Failed to Fetch" I have created a SPFx Web Part using React. It implict authenticates and acquires access token. When i am calling graph api for GET it works fine. ...
0
votes
1answer
1k views

react-search: The type definition `index.d.ts` does not exist. Create one and try again

I am new to SharePoint and I'm trying to deploy a modern Search Web Part following the instructions here sp-dev-fx-webparts/samples/react-search/ When I run tsd install on the command prompt, it ...
5
votes
1answer
28k views

Anyone can explain the .ts file and .tsx file use and difference in SPFx react webpart?

In SPFx No JavaScript Framework webpart contain "webpart.ts" file and write code in it. But in React SPFx webpart, there are 2 file : 1) webpart.ts file 2) webpart.tsx file in component folder. ...
3
votes
1answer
3k 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 ...
5
votes
1answer
2k views

SPFx web part not showing from the catalog

Followed the video from SharePoint Framework development with SharePoint 2016 Feature Pack 2 but could not add the web part to the site because it did not show up. I made sure I have only SPFx 1.0....
0
votes
3answers
1k views

Spfx web part to show task list on modern sharepoint UI

I am looking to leverage team sites for one of my projects. Since modern UI only supports custom lists in web part view, I am looking for some help on how Spfx can be used to show task list web part ...
0
votes
2answers
608 views

Default property values not working in SPFx web part

I have 3 web part properties set up in my spfx web part. However it is not showing the default values I have set { "$schema": "https://developer.microsoft.com/json-schemas/spfx/client-...
2
votes
1answer
1k views

Open modern image file dialog in SPFx web part

By using the "Quick links" client-side web part on a modern site page it is possible to add a new link and set an optional image by a file dialog. Is it possible to use this kind of file dialog in ...
1
vote
1answer
44 views

SPFX webpart not showing when trying to deploy without CDN

I am currently trying to deploy a web part without using CDN. I can't seem to find any up to date guides that go through this process. I have tried following various other posts but my webpart never ...
0
votes
0answers
15 views

How to use items from api calls in another Api call

I have created configuration list which contains list name (configuration list). I wanted to use those list name to get all the columns from those list and export to excel (export from multiple list)? ...
1
vote
2answers
916 views

spfx webpart/component with position: fixed

I'm trying to create a spfx-react webpart for SharePoint Online like the feedback button on the walmart page (https://www.walmart.com right side). This works in edit mode and in the workbench (local ...
0
votes
1answer
1k views

How to add checkboxes to propertypane dynamically

I have a dropdown on my property pane which i populated with sharepoint lists. What i want to do now is to add the columns(fields) of the list(selected on the dropdown) as checkbox(on the property ...
0
votes
1answer
1k views

Getting Failed to load component from localhost URL when deploying SPFx webpart to SP Online

I am trying to deploy my spfx webpart (not for testing). I am using gulp clean --ship gulp build --ship gulp bundle --ship gulp package-solution --ship but getting that error <span class="...
1
vote
1answer
1k views

DetailsList component row rendering issue

There is a DetailsList component inside spfx webpart, which loads all the documents/files using PnP. There is a office-ui-fabric-react check out button outside DetailsList component. When I select ...
0
votes
0answers
39 views

Is there a way to do an if statement in a KQL query?

I'm using the PnP Modern Search SPFX web parts to build a staff directory. The web part configuration accepts a KQL query and allows you to specify the query template. I have specified a query ...
3
votes
1answer
933 views

Sharepoint Item rest query How to get the multiline column value which has append text property set true

I have a multiline column named as "Notes" in a list. This column has the "append text" property set to true. So when I retrieve the item I am getting this column null value. Please help me query this....
1
vote
1answer
20 views

SharePoint Framework not working with script tags

I'm trying to create a web part within SharePoint framework which includes <script> tags however they do not run while in SharePoint, see example code below: public render(): void { this....
1
vote
0answers
31 views

SPFx CDN failed to load. 406 (Not Acceptable) Error

Web part is not loading, it's not able to load files from public SharePoint CDN. Console error: My findings on this issue: I have checked with 3 users and one user is getting this error. For me, ...
0
votes
1answer
57 views

Subscribing to list changes using ListSubscriptionFactory: failed: WebSocket is closed before the connection is established

I followed the Subscribe to list notifications article. I was able to get notified when list items were added or updated. The code: export default class BookingRequestsWebPart extends ...
1
vote
1answer
962 views

ReactDom render multiple elements spfx

Let me start by saying I am working on my first webpart and learning react spfx. I am trying to render multiple elements using ReactDom.render. How do I render both the elements on the same .ts file? ...
0
votes
0answers
29 views

SPFx WebPart started giving TypeError: Cannot read property 'Content' of undefined

This webpart was working on a classic Publishing site. Recently, it started throwing this error message: Error details: Error: Error initializing application. Error: TypeError: Cannot read property '...
0
votes
0answers
22 views

Inventoring SharePoint Online Custom web parts

I want to list all the custom web parts from a SharePoint Online Site using PowerShell. So far I have the command Get-PnPApp so I could use PnP commands. Also the command $web.AppTiles lists the ...
1
vote
2answers
883 views

SharePoint Framework/ issue/ drop down change event on web part/

I want to use drop down control on SharePoint framework webpart(done) and on change event to call some method/ some rest api and so.but it is not allowing. I did not find any article where spfx web ...
1
vote
0answers
195 views

How to check the App Id from the AppTile object in PnP PowerShell for SharePoint Online?

In PnP Powershell, I want to get a list of all my custom deployed web parts from (SPFx) and also check which all sites have them deployed to (they are non tenant wide installs). I have this script so ...
1
vote
2answers
306 views

I want to use sharepoint site asset folder for hosting client side files, where should I define this path in my spfx web part files?

I'm trying to host the JS files (webpart\temp\deploy) of my web-part in the asset library folder, but I'm not able to reference that in the config files. In which file I have to defined that path? the ...
3
votes
2answers
3k 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....

1
2 3 4 5
21