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

General technical questions about the SharePoint Framework client-side development model.

0
votes
2answers
17 views

Office-ui-fabric-react error TS1005: ',' expected

So the only answers that even vaguely approach answering this seem to be on here. I'm pretty new to SPFX but am trying to build some book examples of React-Redux and I always come up against the same ...
0
votes
2answers
27 views

sharepoint get list item returning wrong date time

i noticed while testing that the sharepoint get list item call i am making through pnp sp is wrong. i tried going to the endpoint url directly to check but the return date is the same (wrong date) . ...
1
vote
1answer
29 views

Add SharePoint Site collection Administrator to SharePoint Online

Is there any way to add a user as Site Collection Administrator in SharePoint Online Sites using Rest API or pnp js?. I am using SPFx react js webpart. I have code in c#, but I cannot use it in my ...
0
votes
1answer
24 views

Possible to track session of user in sharepoint?

i just got a requirement to modify some code in my SPFX app to detect a user sessions. the requirements is that i have to lock that specific list which is tracked by a separate tracking list (schema: ...
0
votes
0answers
8 views

Send document from a native document library to a library found in a SPFx webpart

My scenario : I am need to send files from one library(native) in SharePoint to a library found in a SPFX webpart. Step two,once the file in the library(spfx webpart) there is a button associated ...
0
votes
1answer
34 views

SharePoint Framework Extension Deployment Challenges

I am quite new to SharePoint and want to know if I can create a custom variable(property) in SharePoint Online (may be at site level and Tenant level) and use it in SPFx. I had a requirement to ...
1
vote
0answers
14 views

Custom Action on Command Bar on every page

Is there any way to create a custom action in the command bar on every modern page? Not just in a List or in a Library?
0
votes
2answers
113 views

Error when using MSGraphClient

Today I tested some of my apps created with SharePoint framework and they started to show a errors in the webparts and extensions that use MSGraphClient. Before it was working normally. I am ...
0
votes
1answer
56 views

How to connect react web part to azure sql database? [closed]

Any advice about how to connect a spfx web part using the react template to an azure sql database. But can't seem to find a clear example. I'd be looking to bind controls e.g. Combo boxes to a sql ...
2
votes
1answer
39 views

How to apply a theme to a spfx web part?

I have a spfx web part the gets and displays list items. I'm not sure how to apply a theme to this web part so that the font type and style of the web part title and list items match the rest of the ...
3
votes
1answer
60 views

Can't get context for pnp get api calls in spfx solution

I'm having trouble getting the correct site context for @pnp/sp. It works fine in workbench but not when I deploy to a site and add to a modern page. My api calls are being made to /_api/sitepages and ...
1
vote
1answer
30 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 ...
0
votes
0answers
11 views

SPFX include a local JS file - setLike.js

How do I include setLike.js in my SPFX webpart. I have tried a few methods and had no luck so far - what is the correct way to do this?
1
vote
1answer
31 views

SPFX, CSOM for SPO Development

I need to surface some information from SPO within SPO page. I am familiar with on-premise CSOM script webparts where I simply added JavaScript and CSOM code. In SPO, can I still use the same ...
2
votes
1answer
33 views

UI Change in Global Navigation of SharePoint Online Modern Pages

The Global navigation in SP Online classic team sites gets displayed next to the site logo and above logo in Modern Experience. Its easy to modify CSS for classic pages as they are attached to a ...
0
votes
0answers
9 views

SitePages number of Likes (Display and allow user 'like' from a modern page)

I have enabled the SitePages rating feature and set it to likes. I need a way to display something (e.g. a button) on a page that will trigger the current user to like that page. I am using Modern ...
0
votes
2answers
79 views

Getting error 'response.map is not a function' trying to map a list items with managed metadata fields in spfx react solution

I am trying to get items from a links list with managed metadata. I am getting an error 'response.map is not a function'. I have used the sample from this answer to get the data using ...
0
votes
1answer
12 views

Classic pages which use LoadSodByKey('require.js') now fails with a modern SPFX webpart

Classic pages with modern spfx now fails if you load require.js with LoadSodByKey since last week. Any idea how to fix or how to report this to Microsoft? LoadSodByKey("require.js", function () { //...
0
votes
0answers
48 views

SPFx React JS | Bind a dropdown

I have a SPFx React JS web part which populates a grid from SharePoint list. This is working fine. Now, I want to populate a dropdown based on results returned in list. i.e. There is a location ...
2
votes
2answers
133 views

SPFx call a function

We have created SPFx react web part. We want to display data from SharePoint list into a grid. One of the fields is a date field. So need to format the date field. Below is the success function: ...
0
votes
0answers
10 views

is there are way to refresh document library items using spfx extention

is there are way to refresh document library items using sharepoint extension as example,i upload a file through the extension and need to view in Documents folder as this image
0
votes
1answer
29 views

SharePoint Online REST - The HTTP header ACCEPT is missing or its value is invalid

I am building an SPFX web part and trying to get data from a list using REST. Don't want all that noise returned so trying to use odata=nometadata. I've read this and this and plenty of other sites ...
1
vote
1answer
29 views

How to create folder with custom Content Type in REST with SPFx?

I am creating an SPFx solution to create folders with nested folders. This solution is working fine. but I want to attach some metadata to my folder. For this reason I have created a new folder ...
0
votes
1answer
38 views

Can I add an item in a predefined list via listview command set(Sharepoint Framework Extension)?

Using SharePoint Framework extension, I have a list command set for a document library in SharePoint online. On this button being clicked, I want to add an item in a predefined list in sharepoint ...
0
votes
0answers
11 views

Unexpected error in newform form when adding a SPFx webpart in sharepoint 2016

I have a webpart created for sharepoint 2016 using SPFx and when I add this web part on the editForm of a list in sharepoint 2016 then it is working and displayed well. In contrast to add it on the ...
0
votes
0answers
19 views

Uninstall SP-Starter-Kit|

I couldn't clean-uninstall the sp-starter-kit from my dev tenant. Could you please help? I followed the below steps, Removed the solution from the app catalog. Removed the user profile custom ...
0
votes
0answers
19 views

Open Documents with Library settings in Custom SPFx AddIn

I have to open the Documents based on the Library settings in my SPFx AddIn. I can open the file in browser by using the Window.Open method. But I have to inherit the library settings. If the library ...
0
votes
1answer
24 views

SharePoint online workbench not working using Edge

I'm about to develop a SharePoint modern web part but I cannot test my web part online using Edge (IE 11 works fine). I have deleted the gcb-serve-data folder and reinstalled the cert, still I get ...
1
vote
0answers
21 views

Hide/Remove Item Content Type from a SP List in SPFx

I am using SPFx webpart on SP2016 and able to create a list with custom content type,below is code sample. But I am not able to get any end point to remove default Item content Type. I want my custom ...
0
votes
0answers
22 views

How to create SharePoint typescript react module

I'm trying to make my own module which allows to create component templates and transpile everything to a single js file to be able to use it as external templates in SPFx webparts. Currently i'm able ...
0
votes
0answers
34 views

Problems loading in external JS SPFX

I am trying to embed a yammer open graph feed into a custom web part using SPFX. I have the following: config.json "externals": { "YammerEmbed": { "path": "https://c64.assets-yammer.com/...
0
votes
0answers
61 views

What's the state of eventAggregator for sharing data in SPFx?

What is the current state of eventAggregator in SharePoint Framework? It can be used to share data between web parts as described in this blog post and demoed on GitHub. Above info is rather old (mid-...
0
votes
1answer
21 views

Power BI webpart not visible when adding it with OfficeDevPnP

I am creating a console app that will create sitepages with certain webparts in it. To Manage this I am using OfficeDevPnP and how I do it is described in the text below. The issue here is that the ...
0
votes
1answer
59 views

react, spfx and taxonomy

I am using react to get the term by id, but the problems is that I am not able to get any child term under the term.For example: -IT --software --hardware IT is term not termSet. taxonomy....
0
votes
1answer
36 views

How to deploy SPFX in 2016?

I see one JSON file and two js files inside my deploy folder. I have added inside site assets and given the site assets URL in the CDN path, but I cannot find the app in the "Add an app" page. I'd ...
0
votes
0answers
15 views

SPFX Tab event key not being detected when page is published

i created an spfx app and i have a form that inputs multiple items like so: i am capturing the keydown press through: switch (event.key) { case 'Enter': this.setState({ ...
0
votes
1answer
37 views

Is there a yeoman generator for SharePoint Add In's?

I am coming back to Sharepoint development after 6 years. I initially thought that I needed to build a SharePoint Hosted Add-In. I want to build an app that operates within a SharePoint site. It will ...
0
votes
0answers
30 views

spfx webpart custom themes

I have created a simple webpart then I define background for element background-color: "[theme: themeDark, default: #005a9e]"; , and on site page it inherit color and show themeDark of current set up ...
1
vote
1answer
18 views

Provisioning Lookup field with reference to another provisioned list

I'm trying to provision two lists (List 1 and List 2). List 1 has a Title column and in List 2 i want to create a Lookup field with a reference to the Title column in List 1. The problem is that ...
0
votes
0answers
35 views

why is my fabric react ui people picker returning different properties on item edit?

I have an issue with the fabric ui react people picker. basically, i need to get the userids of the users with this code: public getUserIds(userInfo: any[]): Promise<any> { let resp; ...
1
vote
1answer
27 views

Not specifically SharePoint but JavaScript dev using spfx

Can someone explain to me this: private _getMockListData(): Promise<ISPLists> { return MockHttpClient.get() .then((data: ISPList[]) => { var listData: ISPLists = { value: data ...
0
votes
0answers
20 views

is there property called ''pdfConversionUrl' in sharepoint extension

I found pdf conversion url like this https://northeurope1-mediap.svc.ms/transform/pdf?provider=spo&inputFormat=docx&cs=fFNQTw&docid=https%3A%2F%2Fdenterprise.sharepoint.com%3A443%2F_api%...
0
votes
1answer
47 views

spfx peoplepicker- change state on remove suggestion

I want to change a state when the user remove a person from people picker? <NormalPeoplePicker onChange={this._onChange.bind(this)} onResolveSuggestions={this....
0
votes
1answer
29 views

How do i get current aspx sitepage with SPFx

I have build a webpart with SPFx and using following libraries @microsoft/sp-core-library": "1.6.0 @microsoft/sp-lodash-subset": "1.6.0 @microsoft/sp-office-ui-fabric-core": "1.6.0 @microsoft/sp-...
0
votes
1answer
49 views

How to default select user in People Picker?

I want to set default selected user on people picker? <NormalPeoplePicker onChange={this._onChange.bind(this)} onResolveSuggestions={this._onFilterChanged} ...
0
votes
0answers
18 views

Peoplepicker get all users in tenant

How can I get all of the users in my tenant? I get just the users in a group. This is my code: private _getPeoplePickerItems(items: any[]) { console.log('Items:', items); } public render(): ...
0
votes
0answers
23 views

how to handle click event of custom menu item which created through the sharepoint add-in custom action

i created custom action of menu item using sharepoint hoshted add-in. instead of url redirection when click custom menu item ,is there way to handle click event of this item? <?xml version="1.0" ...
0
votes
1answer
70 views

spfx get value from input

How te get the value from input, i always get the default value from the input field. This is my code: export default class HelloWorldWebPart extends BaseClientSideWebPart<IHelloWorldWebPartProps&...
0
votes
0answers
33 views

How to prevent changing iframe content after click

I would like to build a SPFx app but I don't want to build everything, I´d like to use as much as I can OTB. The idea is to have one SPO-list witch should be hidden but I would like users to be able ...
0
votes
1answer
45 views

spfx MSGraphClientt

I need to write a webpart, which shows data from the MS Graph. I wrote this example code import { Version } from '@microsoft/sp-core-library'; import { BaseClientSideWebPart, ...