Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [spfx-webparts]

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

0
votes
0answers
76 views

How to access a file stored in SharePoint Document library which is Public CDN

I have a sharepoint document library.I have made this library as Public CDN. This library contains some files. Now i m trying to access the files inside SPFX but it doesnt work ? image I am getting ...
1
vote
1answer
108 views

How to use Highlighted content property pane in my own webpart?

I'm currently developping my own webpart using Sharepoint Framework. In my webpart property pane I would like to use the exacte same groups as in the "Highlighted content" webparts ( Source and Filter ...
2
votes
1answer
275 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 ...
1
vote
2answers
1k views

SPFX react - click button to update web part

I am using the SharePoint framework with React. I have a button on the web part that when clicked, I want to output a string on the web part. The way I currently have it set up, you have to refresh ...
0
votes
2answers
234 views

Get values in from Get Request promies in SPFX

So I'm trying to get value from my result sources by using a GET request but I'm having trouble iterating to the items as they are under: "PrimaryQueryResult.RelevantResults.Table.Rows" And I don't ...
1
vote
2answers
285 views

SharePoint Framework - Provision Lookup fields

I am using SharePoint Framework to provision list and libraries according to the below article: https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/provision-sp-assets-from-...
1
vote
0answers
179 views

Cannot add multiple items in list where using pnp batching

I use "sp-pnp-js": "^3.0.4" Where i trying to create batch for - add multiple items into a list for SharePoint On-Premise . This is my code: let list = pnp.sp.web.lists.getByTitle("MyWayBills"); let ...
0
votes
2answers
254 views

client webpart multiline displays as one line only

I am trying to create a multiple line webpart property using this code: PropertyPaneTextField('test', { label: 'Multi-line Text Field', multiline: true ...
3
votes
1answer
492 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-...
0
votes
1answer
621 views

Type '{}' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes<ExampleComponent> & Readonly<{ children?: ReactNod…'

I got this problem and I need some help. This is the message I got: Type '{}' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & Readonly<{ children?: ReactNod...' ...
0
votes
0answers
183 views

'SPHttpClientConfiguration' is not assignable to to parameter of type 'SPHttpClientConfiguration' #spfx

I have updated my packages to the latest version as per https://docs.microsoft.com/en-us/sharepoint/dev/spfx/toolchain/update-latest-packages, deleted all items in the node_modules folder and re-...
0
votes
1answer
174 views

Need help with url and rollup image fields in sitepages using SPFX with REST

I'm new to SPFX and still trying to find my way around. At the moment I'm struggling to access particular fields from site pages using REST. I realize this is a n00b request, but any help would be ...
2
votes
4answers
545 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
0answers
252 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 ...
0
votes
1answer
44 views

SPFx : how to get all installed custom apps in a web with appweburl?

How can i get all installed custom apps in a web with appweburl in spfx webpart.
0
votes
2answers
164 views

Provision sharepoint list & columns without creating content type using schema.xml SPFX

https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/provision-sp-assets-from-package In the documentation it specifically told us to create fields, add to content type, then add ...
0
votes
1answer
43 views

Calculated column not provision to List

I have tried to provision a Calculated column to SharePoint using the SPFx but it seems the column is not added to List. It's provision successfully to the Site Columns as well as the Content Type ...
0
votes
1answer
44 views

Batching MSGraph: how to use data from previous requests in JSON

I would like to make three consequential POST requests using MS Graph: (1. Create an Office 365 group; 2. Add the requester as a member of the group; 3. Create an MS Planner Plan, and set the Group ...
0
votes
1answer
566 views

React State in Property Pane?

While using SPFx with React how do I use state in the property pane to change and manipulate values instead of default properties? Can I add state to the BaseClientSideWebPart? Or is there another way ...
0
votes
1answer
84 views

Correct JSON format to add a user to group using REST POST call in spHttpClient? “Input string was not in a correct format.” error

I am getting an '“Input string was not in a correct format.” error after submitting the following POST call: any idea what I might be doing wrong here? const addUserURL: string = newWeb + `/_api/web/...
1
vote
1answer
224 views

Responsive Design in Web Parts

How can one use a grid like this https://www.npmjs.com/package/react-material-responsive-grid so it's displayed on mobile phone properly without the Desktop View on any Mobile phone browser(Safari,...
1
vote
1answer
382 views

Taxonomy Field Values/Filtering with SPFx

I'm looking for some examples or guidance for working with taxonomy fields in SharePoint Framework. What I need to do is have a field that is tied to a TermSet. Based on the user's input into this ...
0
votes
1answer
316 views

Create a subweb using REST in SPFx: SyntaxError: Unexpected end of JSON input

I am trying to create a classic subweb using a POST REST call in SPFx. Any idea what I am doing wrong here? const postURL: string = `${this.props.context.siteUrl}/_api/web/webinfos/add`; const ...
3
votes
1answer
48 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 ...
0
votes
1answer
732 views

SPFx Web Part - No 'Access-Control-Allow-Origin' header is present on the requested resource.

When attempting to access an Azure AD secured web API from a SharePoint framework web part, I get the following error: Response to preflight request doesn't pass access control check: No 'Access-...
1
vote
1answer
1k 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
1answer
134 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 ...
1
vote
1answer
1k views

Implement Display, Edit and New forms in spfx web part using reactjs

I have 3 buttons on spfx web part 'Display','Edit' and 'New'. When I click on these buttons, respective form should open with text boxes and data from sharepoint (online) list. I want to use Reactjs ...
1
vote
1answer
100 views

Mapping json out to typescript in spfx

I have the following json output : "ParentTerm":{ "Name":"Accounting", "ID":"e8c3c601-d3e0-4499-b0ad-3b520924af15", "Root":true, "ChildTerm":[ { "...
2
votes
2answers
480 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/...
4
votes
1answer
149 views

Add an SPFx WebPart from an SPFx Extension on a modern site

Within our product we have created an SPFx extension to show a navigation component on the top of our modern pages. Additional to this navigation component we want to show a button which opens an ...
2
votes
2answers
346 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"></...
1
vote
1answer
59 views

How to submit to the seller dashboard

I've developed a webpart using the SharePoint framework. I now need to submit it to the seller dashboard so that my customers can use it. When I go to submit the generated .sppkg file (I'm assuming ...
4
votes
0answers
222 views

Print Files through SPFx/JS?

I would like to build a button which would send a batch of files to the printer when clicked (It can prompt the user. Doesn't need to go to the printer without approval). The files would exist in a ...
1
vote
1answer
148 views

Blank space on SharePoint development environment

I am developing a webpart for SharePoint and I have an annoying issue with my development environment for sharepoint Online. I have a blank space on the right. How can I fix it ? It's an unusable ...
0
votes
0answers
21 views

Using Custom Object is borken by property serialization

I've been fighting over Sharepoint Framework for the last 4h now and I'm getting desperated :( So my implementation is the following: I've created a custom object that implements an Interface. Then ...
4
votes
0answers
40 views

Is it possible to include fields in a sharepoint list directly from elements.xml file?

I am trying to provision a SharePoint 2013 tasks list from a spfx app using the feature framework. I am able to create an out of the box tasks list with the following list definition in my elements....
0
votes
0answers
86 views

Getting error sp-webpart-workbench-assembly_en-us_ Uncaught TypeError: Cannot read property 'searchablePlainTexts' of undefined

I am trying to imitate the React todolist webpart using semantic-ui-react component instead of office-ui-fabric. i followed this sample-->(https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/...
1
vote
1answer
171 views

How to ensure access to Delve via JS/SPFx?

I'm working on an SPFx web part which displays the company's employees from a list. One of the primary functions of the web part is to pull a couple of Users' current profile pictures from Delve. ...
0
votes
0answers
133 views

SPFx: Get item id/file ref of selected item in the butting click event using Reactjs

I would like to fetch selected item Id and file reference Url in the button click event. Thanks in advance
0
votes
2answers
217 views

Unable to get the label of term using SPFx with Rest API

So I'm trying to get the label out of the terms tagged in a sharepoint list but as we all know there is a bug that you can't get the label using rest API if the field isn't set to multivalue...So I'm ...
0
votes
1answer
149 views

error: no mixin named focus-border office ui fabric react.Issue when referring common

Requested priority: (Blocking, High, Normal, Low) : High Describe the issue: I have created a sharepoint react framework solution.This solution uses List Component.I now want to use the (https://...
1
vote
0answers
365 views

Sharepoint React Framework , office ui fabric css not getting applied on components

This is the current version of office ui fabric referened in my package : I am using sharepoint react framework and have used List component : Code Link : https://github.com/OfficeDev/office-ui-...
0
votes
1answer
17 views

API field setup requirements?

I have a custom list and would like to reference the information in a SPFX web part. I'm following the sharepoint-crud sample from github as an example. When I make the call to the desired list with ...
0
votes
0answers
147 views

How to reference strings.js in SPfX? (Uncaught TypeError: Cannot read property 'STS' of undefined)

I am trying to migrate my code from Classic experience to SPfX. My code is using the SP.UI.ModalDialog, and I have referenced successfully the MicrosoftAjax.js, SP.Runtime.js and the SP.js files in ...
0
votes
0answers
148 views

Persist changes in the default web part property type

I have a default webpart property (string type) in which I am saving my settings programmatically and retrieving it when required. I am using SPfx. For example for saving value I use this....
0
votes
1answer
718 views

SPFX - Get what permission group user has in modern?

Is it possible too get the user security group? I can't seem to find any information about doing this in SPFX, just for current web and list... It should be possible having a div that renders the ...
0
votes
1answer
547 views

Interacting with Lists in SPFx?

I would like to start building SFPx web parts which interact with lists in my site, but I am having a hard time figuring out List interactions. Where can I go other than the tutorials from Microsoft (...
1
vote
1answer
330 views

Using spservices module

I have a SPFx web part I'm trying to include spServices in. I've done the npm install for jquery@2 and spServices, run npm install in the project root directory, and tried to run grunt (as outlined in ...
0
votes
0answers
233 views

Error while using @microsoft/sp-dialog in SPFX TS1005

When using Dialog class from sp-dialog, gulp serve throws the error. Created an SPFX project with react framework. installed sp-dialog with the following command. npm install --save in the .tsx ...