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
590 views

Can a user update a SharePoint list using SPFx without the user having access to the list?

In C# you could allow users to access a SharePoint list they have no access to by using SPSecurity.RunWithElevatedPrivileges(delegate () .....etc. Is there a way achieving the same functionality ...
1
vote
0answers
159 views

How Does SPFx React to a button being pressed?

Does anyone know how the SharePoint Framework reacts to a button being pressed ? What TypeScript do I need to make this happen (ie get notified when a button has been pressed)? Regards Nigel
1
vote
1answer
2k views

Loading external library fails “If loading a global module configure the global name via…”

I'm trying to load winston into the default React (hello world) component, but I cannot get it to work. When running in workbench and adding the webpart I receive the following error: Error: Unable ...
1
vote
1answer
424 views

Would multiple SPFx webparts on page load duplicate dependencies?

If I have an SPFx webpart and that webpart uses these dependencies: jQuery jQueryUI Angular LoDash Then I have another SPFx webpart and that one uses: jQuery jQueryUI React Moment If I load ...
1
vote
1answer
181 views

React.js code structure question

I have a question which hope you might be able to help me with. If I was to create a custom class class 'SPList', and on my componentDidMount function or the constructor. I was to call a REST ...
4
votes
2answers
804 views

How does Workbench.aspx in Office365 get local files?

I'm sure this is a really simple answer but I can't see the connection. Essentially I'm playing with the SPFx tutorials and I just uploaded the workbench.aspx to my shared documents and the hello ...
2
votes
2answers
146 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 ...
1
vote
2answers
131 views

Error after upgrading to SPFX Drop2

Hi I upgraded my project from drop1 to drop2 follwing the instructions at https://github.com/SharePoint/sp-dev-docs/wiki/Release-Notes-Drop-2. I cannot get my webpart to load mow. I keep getting the ...
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 ...
6
votes
4answers
4k views

'gulp serve' command opens SharePoint Framework workbench in a blank screen

I'm trying to build a simple client-side web part using new SharePoint Framework with the help of OfficeDev Site. I've installed all the required components mentioned in OfficeDev After the ...
0
votes
2answers
179 views

Client Side (inline IDE) editor/app for editing (.js , .json, .css, .html) files in a Document Library

We more and more store data as .json files in a Document Library. Instead of (re)writing our configuration front-end, I would like users to edit the bare .json files. (and while we're at it, all ...
1
vote
2answers
1k views

httpClient Upload file to SiteAssets

How can I upload a file to the current web SiteAssets or document library using the spfx httpClient? Is there a code sample I can learn from?
4
votes
2answers
410 views

SPFx: How to test for the 3 SharePoint flavors: Classic, New Experience and SPFx

When injecting code in the New Experiences (only possible with Browser Extension) I use: var isClassicSharePoint = typeof SP !== 'undefined'; So my generic library knows when to use SP.SOD and ...
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 ...
0
votes
1answer
384 views

Tutorial 5 Step 5 loading error: unable to load web part script resources

When testing the jquery webpart, got loading error:
5
votes
1answer
138 views

SPFx: Can we safely use eval or is it evil in SPFX?

I have used JavaScript since it was called LiveScript, and know to value persons who say "Eval is Evil" (Classic SharePoint uses eval() at least 5 times in its core code) So when a new kid on the ...
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 ...
6
votes
5answers
2k views

SPFx: Is TypeScript compulsary for future SharePoint development?

Been looking into ways to keep a development team with medior JavaScript skills into the loop. Basically I just want a SPFx Content Editor WebPart where they can do anything they have done with ...
0
votes
1answer
364 views

Errors when running gulp serve when using SharePoint Framework Office UI Fabric Components tutorial

Should I need to worry about these lint errors in Using gulp serve in the SharePoint Framework Office UI Fabric Components tutorial? https://github.com/SharePoint/sp-dev-docs/wiki/Using-Office-UI-...
4
votes
1answer
4k views

Adding onClick event to a React Web Part

I want to add a simple onclick function, but having trouble doing it. I have looked online, and have tried multiple ways - such as binding it - this.update.bind(this)} within the html string, etc ...
3
votes
2answers
987 views

Tutorial 4 of SharePoint SPFx Tutorials: Error configuring web part to load from CDN

i have followed HelloWorld, Deploy to CDN and until "Configuring web part to load from CDN" everything worked; i have updated the "cdnBasePath" in "write-manifests.json" as described, and continued ...
1
vote
0answers
44 views

SPFx: 🚑 error: Render needs to be overriden in the derived class

It is two hours past beer-o-clock here in Amsterdam, and there is no beer at the office, so I have to drive an hour in 30 Celsius without AC (no use on a motorbike) to get me a cold one Spent 15 ...
20
votes
4answers
5k views

SPFx: loading jQuery (and other libraries)

The SharePoint Framework weather example loads jQuery inside the WebPart render method: https://www.youtube.com/watch?v=HGC9gsDRy1E#t=10m30 Questions: Is this the preferred development pattern? ...
1
vote
1answer
198 views

Trying SPFx Tutorial 5 without VS2015 installed

I have set up my Windows 10 Machine for SPFx development. I am using Visual Studio Code and not Visual Studio itself. NB When you install Python (Setting up your machine) it needs .NET 2.0 to be ...
2
votes
1answer
631 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:...
1
vote
1answer
228 views

Tutorial 4 of SharePoint SPFx Tutorials Azure Instructions Unclear

The Instructions in Tutorial 4 of the SharePoint SPFx Tutorials are unclear in terms of what is required from Azure. Instructions for creating Storage account name, Blob Container Name and Storage ...
4
votes
1answer
275 views

Missing workaround in SPFx JQuery WebPart

In the SPFx JQuery tutorial there is this instruction :- For drop 1, there is a workaround needed when loading css files (later on in this tutorial we will show you how). For now, you need to include ...
1
vote
1answer
750 views

How can I implement Angular 2 routing in an SPFX webpart

How can I use Angular 2 in SPFX? I appreciate its not out of beta quite yet but I have found it to be excellent for 'larger' apps. Especially RC5 which provides a new ngModule decorator. Using this ...
0
votes
0answers
1k views

SPFx create New Experience UI List/Library View with my own content

Been playing with this SPFx for some hours now, done the Tutorials, and.. I am not impressed. I was expecting SPFx to be a library so that I could create New Experiences (Library View, List View) by ...
3
votes
2answers
192 views

SPFx: breaking out of the ClientSideWebPart CanvasZone

In Classic SharePoint days I would break out the CEWP (or do it straight from a UCA-ScriptLink) and add content to the DOM or even replace the whole s4-workspace Do I (each CSWP) now have to stay ...
5
votes
3answers
4k views

SharePoint Framework web parts - dynamic properties pane

I was playing around with the SharePoint framework and I was trying to get the web part to load SharePoint lists via a promise. First I noticed that await and async are not supported (probably due to ...
1
vote
1answer
110 views

MIssing <p> from HellowWorld.ts in SharePoint Framework HelloWorld sample

In the SharePoint Framework Yeoman generated HelloWorld WebPart instructions scroll down to :- Switch back to HelloWorldWebPart.ts file. Once you added your properties to the web part props, you ...