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
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 ...
2
votes
3answers
3k views

SharePoint Framework and workbench.aspx

I'm trying out the SharePoint Framework and am following the setup instructions. I've downloaded and uploaded to my site workbench.aspx. When I go to "preview the web part in SharePoint" and load the ...
1
vote
2answers
2k views

Error trying to reference an image in SharePoint Framework web part using react

when I'm trying to reference an image in my react component in the render method as follows. const leaderImgSrc = require('myimage.jpg'); and then in the TSX <img src={leaderImgSrc} alt='an ...
1
vote
1answer
536 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 ...
1
vote
1answer
825 views

Sharepoint workbench page with NoComponentId error

So I did basic hello webpart setting and ran gulp which shown me SP framework local page. Now i wanted to see this in sharepoint context , so I copied workbench.aspx from https://github.com/...
0
votes
1answer
309 views

Access denied in Workbench.aspx

I downloaded the workbench.aspx file and uploaded to office 365 SharePoint Online Developer site under "Documents" document library. When I try to open the same, I page does not load correctly (I do ...
5
votes
1answer
520 views

SPFx: inform users when Search last indexed and when Items will appear in results

Scenario: Large team processes a high volume of customer data (multiple Libraries, Document Sets and Sites/ Sites Collections) Part of it is trading information so accurate info is vital. I have an ...
1
vote
0answers
1k views

Debugging Sharepoint Framework webparts with VS Code on MAC

I am trying to debug a SPF Webpart in VS Code but with mac osx(el capitan), I have installed the chrome debugger extension. I took as a basis, Elio's post here: https://www.eliostruyf.com/how-to-...
4
votes
1answer
571 views

jquery not loaded with SPF

I have this on my config.json { "entries": [ { "entry": "./lib/webparts/pnpcrudsample/PnpcrudsampleWebPart.js", "manifest": "./src/webparts/pnpcrudsample/PnpcrudsampleWebPart....
2
votes
1answer
638 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
0answers
119 views

SharePoint framework features

According to http://dev.office.com/sharepoint/docs/spfx/web-parts/basics/notes-on-solution-packaging you can provision content types and pages using the SP Framework app package. What are the ...
3
votes
1answer
106 views

Can I get a trace of TypeScript statements executed in a SharePoint SPFx client web part?

Is there a way with gulp serve to get a trace of TypeScript statements that are executed in a SPFx client application ?
0
votes
0answers
2k views

cannot find module (typescript)

I am running an easy Sharepoint Framework project in Visual Studio Code: I have this structure: My files are as follows: ComplexCalculator.ts export class ComplexCalculator { public sqr(v1: ...
2
votes
2answers
596 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
806 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 ...
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 ...
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 ...
0
votes
1answer
385 views

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

When testing the jquery webpart, got loading error:
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 ...
1
vote
1answer
752 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 ...
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 ...
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? ...
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 ...
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
991 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 ...
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 ...
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 ...
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 ...
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 ...
3
votes
2answers
193 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 ...