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
1answer
2k 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
307 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
60 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
484 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
355 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
2answers
4k 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
307 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
927 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
204 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
126 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
531 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
230 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
638 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
859 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
328 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 ...
2
votes
2answers
4k views

Default Dropdown Option PropertyPaneDropdown SelectedKey Not Working

I'm working with the RC0 version of spfx and am having trouble selecting a default dropdown option. I'm using the selectedKey property that I found in the documentation here. I have used both text ...
2
votes
1answer
1k views

New Release RC0 , Issue with this.context.httpClient.get method

Till drop 6 i was able to get user properties using Rest call method as below. public getUserProperties(): Promise { return this.context.httpClient.get( ${this.context.pageContext.web....
2
votes
2answers
137 views

Updating web part files in azure storage

I'm trying to update an existing spfx web part by uploading the new javascript bundled files to azure storage (using gulp --ship && gulp deploy-azure-storage). The problem is every time it ...
2
votes
1answer
241 views

Update List Item SPfx not working

Below is the code, which is not working, shows below error An unexpected 'PrimitiveValue' node was found when reading from the JSON reader. A 'StartObject' node was expected. const body: string = ...
2
votes
0answers
40 views

Error in seting up spfx 1.7 with angular 7

Hi I am setting up a SPFX 1.7 project with Angular 7 using the sample which is done with previous version. https://www.youtube.com/watch?v=_OgEqWtouuU https://winsmarts.com/use-spfx-with-angular-cli-...
2
votes
0answers
55 views

SPFX WebPart: Getting HTTPS certificate ERROR in IE11

Getting HTTPS certificate error in IE11, webpart is working fine in chrome, firefox, and Edge but NOT in IE11. The webpart is just displaying some simple list data in dropdown component, and nothing ...
2
votes
1answer
242 views

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

On componentDidMount I have received the current logged in user using MSGraphClient. I have saved the object that I received from graph in fullObject variable. I am using below code: <...
2
votes
0answers
40 views

Update a library field when uploading a file using javascript

I am using a spfx webpart to upload a file and modified a column value associated tothat file. The code below works and stop working without any reason and i can modify only the title field with it. I ...
2
votes
1answer
177 views

View SPO Modern list in SPFX

I'd like to ask if its possible to achieve something like this -> https://collab365.community/create-manage-sharepoint-list-teams-tab/?fbclid=IwAR0FhFIvH9S51ZNvJbcR_dtFzl0Xe2zljyNP-...
2
votes
0answers
129 views

Office-UI-Fabric Pivot with React Router? Possible or not?

I face real challenge (at least for me) so I decide to ask for some help here. I'm building SPFx app where I'm using Pivot from UI-Fabric and I would like the current user to be able to navigate back ...
2
votes
0answers
503 views

Sharepoint Framework Dialog, Modal and Panel not working

I have created a web part in react js which contains a Microsoft office UI fabric control "Modal" and it pop outs on a button click. This feature works fine on my local workbench but whenever I ...
2
votes
1answer
459 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
0answers
110 views

Dynamic update Icon in SPFX client Web Part

I am using office ui frabric details list to display documents on spfx client web part from here. Now, I want to implement check-in/check-out icons to be displayed on spfx client web part dynamically ...
2
votes
0answers
75 views

TypeScript and SharePoint Framework question - although works but does it represent correct design?

Thanks for reading my question. I am just beginning to learn TypeScript and from my understanding so far I have created the follow code to retrieve list items from a list. The code works but I am not ...
2
votes
0answers
219 views

Webpart built using latest spfx version not working on the classic site

I have built an angular 1.x webpart application using the spfx 1.4 version. The webpart works in the modern sites pages but is not working on the classic site pages and I am getting the following ...
2
votes
1answer
536 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
0answers
678 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-...
2
votes
0answers
56 views

How to get custom webpart have its table rendering overlay other SP Online page elements below it? [closed]

I'm authoring custom web parts with SPFx. I've tried fiddling with the CSS z-index and even with setting the lower page part , that is, the part-to-be-overlaid to negative value with the part ...
2
votes
0answers
60 views

Is it possible to create a SharePoint hosted list by SPFx?

I need to create a list inside the app which I can remove it when I delete the app from the site.
2
votes
2answers
436 views

SharePoint Framework onchange method not called

I'm new to SPFx and doing this plain Javascript web part to kick off things but have hit a read block. I can't seem to figure out on how to properly call the oncahnge method on a search input: <...
2
votes
1answer
455 views

SPFx webpart issue in Custom Master Page

I'm getting below error when I add the SPFx app Webpart in Sharepoint Online page with custom master page. Uncaught Error: Multiple anonymous defines in module https://component-id.invalid/597e7384-...
2
votes
2answers
98 views

Sharepoint framework, environment specific build configs [closed]

How to separate string constants depends on environment (dev\test\prod) build in Sharepoint Framework?
2
votes
1answer
299 views

Using <a> tag in SPFx Web Part causes the whole page re-rendered in modern site page

We have a SPFx Web Part which uses the A tag with href='#' to create dropdown menus(clicking the tag shows a dropdown menu). The tag works well in a Classic page, however, when the Web Part is added ...
2
votes
1answer
450 views

SPFx breakpoints and debugging from Visual Studio Code instead from Chrome

I am trying to find a way to debug my local SPFx workbench from Visual Studio Code instead from Chrome, but I could not find any guides on how to attach the Chrome to Visual Studio Code and hit a ...
2
votes
1answer
725 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/...
2
votes
0answers
186 views

Issue with next metadata missing on Rest API Call

I have a Pages Library which has a Managed Metadata Column called Category. I am using REST API to query this list. I need to get the top 13 items and implement "Next" paging. When I am accessing ...
2
votes
0answers
87 views

include feature.xml in spfx webpart

The DOcs at https://dev.office.com/sharepoint/docs/spfx/web-parts/basics/notes-on-solution-packaging say that I can include a feature.xml with my spfx webpart to have sharepoint resources provisioned ...
2
votes
1answer
145 views

SPFx web part page context does not update when linking between pages

I have added the same SPFx web part to two different site pages. The web part contains links (a href) to both pages and some page related info collected from this.context.pageContext. When I click ...
1
vote
2answers
5k views

using bootstrap modals in SPFx webpart

This is the example referenced and I already imported required sources from cdn; after installed bootstrap("npm install --save bootstrap") I added the references. SampleWebPart.ts: export default ...
1
vote
2answers
4k views

getting list items in SPFx application

trying to retrieve list items via get method of spHttpClient object in SPFx webpart project. Here code piece; private readItems(): void { this.setState({ status: 'Loading all items...', ...
1
vote
2answers
315 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 ...
1
vote
1answer
118 views

What is difference between SharePoint Framework (SPFx) Extensions and SharePoint Framework (SPFx) Web PART

I have started working on SharePoint Online. Where I have to use SPFX. What is the Difference between SharePoint Framework (SPFx) Web Part and SharePoint Framework (SPFx) Extensions
1
vote
1answer
1k views

How to add new webpart to an existing spfx project

I have an existing sharepoint framework (SPFX) project. Now I want to create a custom search web part. So how can I add a new webaprt to existing solution PS: I am very new to SPFx. TIA
1
vote
1answer
562 views

Creating list columns in spfx Web Part

I am able to create a custom list in spfx webpart through elements.xml with the following xml snippet: <?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/...
1
vote
1answer
497 views

The value for “webpart context configureStart” must not be undefined

Getting following error in after adding webpart. I can add it workbench.html but in workbench.aspx it's not working. The value for "webpart context configureStart" must not be undefined It's ...