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
0
votes
0answers
12 views

SPFX properties how to add images to properties?

I must create a toolbox. How could I put images on properties ? And first of all solo image which shows toolbox graph and next the 15 or 116 icons which could be chosen if the user choose them to the ...
1
vote
2answers
28 views

SPFX rest call response seen in network tab but I cant read it on console

I got an issue I'm doing a rest call to get columns of a list, the call success because I can see the response in the network tab of the developer tools, here is a picture: for some reason when I try ...
3
votes
2answers
138 views

Calling external API in SharePoint framework

I am trying to call the dummy API from SPFX, but I am getting an error, Failed to fetch, this.context.httpClient .get("http://dummy.restapiexample.com/api/v1/employees", HttpClient.configurations....
0
votes
0answers
17 views

SPFx packages are referencing older versions

I have created a new solution with option SharePoint 2016 onwards, including 2019 and SharePoint online. Then I have added a web part and did the gulp serve. I got below error: Now I checked the ...
3
votes
1answer
28 views

PnPJS - MS Graph API - how to get group photo

I am using PnPJS for MS Graph API to retrieve groups information in SPFx solution. I am able to get the groups information properly. I need to get the group photo also, since photo is not available ...
-2
votes
0answers
25 views

Error “Something went wrong” [closed]

Something went wrong If the problem persists, contact the site administrator and give them the information in Technical Details. Technical Details [SPLoaderError.loadComponentError]: ***Failed ...
0
votes
1answer
36 views

SPFX open new list item using modal dialog

The code below opens a new item in Iframe/modal dialog. But when the user saves or closes the modal form i would like it to be closed and not redirected to any other page. Is there any way I can ...
1
vote
1answer
613 views

Open modern image file dialog in SPFx web part

By using the "Quick links" client-side web part on a modern site page it is possible to add a new link and set an optional image by a file dialog. Is it possible to use this kind of file dialog in ...
4
votes
4answers
335 views

How to catch navigation event in SPFx webpart?

Is it possible to catch navigation event inside Sharepoint Framework web part? I know this is possible in application customizer using context.placeholderProvider.changedEvent, but I cannot find ...
0
votes
0answers
8 views

How to Render Modern Search Web part Results in Tabular format with additional metadata columns that allows to sort the results

I am using Modern Search Webpart with custom template to display the results in tabular format with additonal managed properties, which works fine. How can I make headers to act as Sortable fields, ...
0
votes
1answer
20 views

SharePoint Online Integration with Service Now [closed]

I want to surface ServiceNow knowledge base / Incidents in a SharePoint Online site and Service Now will be the source of truth for managing KB articles. I'm looking for the best practices / ...
1
vote
2answers
39 views

spfx webpart/component with position: fixed

I'm trying to create a spfx-react webpart for SharePoint Online like the feedback button on the walmart page (https://www.walmart.com right side). This works in edit mode and in the workbench (local ...
3
votes
2answers
762 views

Custom webpart (spfx) not listed in app gallery

I created an app catalog and a developer site Then I uploaded the SpFX Webpart package But the Webpart is not listed in the app gallery of my developer site so I can't use the web part. Any tips?
3
votes
2answers
998 views

Office UI Fabric DetailsList(React) rendering: DetailsColumn.render() error

I am trying to add a very basic implementation of the Office UI Fabric's DetailsList React component to my project, but keep on getting the following error when trying to render it: 'DetailsColumn....
1
vote
1answer
54 views

SPFX - React JS : How to handle an empty list

SPFX-ReactJS newbie here. Wondering how I should handle an empty list. I am trying to connect my web part to a list and simply display them on my web part and automatically update the page as items ...
1
vote
2answers
495 views

SPFX webpart context is undefined

Ok so i've searched for a while and tried everything. I've followed these steps as well -> How to retrieve pageContext in SPFx? So far its just a "testing phase", but i get stuck at the beginning ...
0
votes
1answer
24 views

Office UI Fabric not loaded with SharePoint 2016 | SPFx

I have sharepoint 2016, and i am trying to load the property panel of spfx webpart, however it's loaded without fabric icons. For example the Back and Next buttons look like this: Is there a way to ...
3
votes
1answer
256 views

how to install api(youtube-api-search ) in spfx&React project created by yeoman-generator

I created my project wth yeoman template generator; yo @microsoft/sharepoint command(react choosen as JS framework). than installed youtube search api npm install youtube-api-search so far ...
0
votes
1answer
24 views

Adding data to window object -

In the webpart I am currently preparing using SPFX I need to assign some user data into window object: (<any>window).userDetails = { displayName: this.context.pageContext.user.displayName,...
5
votes
2answers
5k views

workbench page shows “This site can’t provide a secure connection” on creating SPFx Webpart

I am new to SPFx, tried to create simple webpart using SPFx. Referred from here. Followed these steps: -Installed nodejs -Installed gulp & yomen using npm install -g yo gulp in powershell. -...
1
vote
3answers
48 views

To retrieve a single list item by using current date

I have created a list, and the list has many items. I have to retrieve a single list item based on current date. I would appreciate if some one could help me how to retrieve that particular item from ...
1
vote
2answers
204 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
3answers
1k views

Add OnClick Event to SPFX Html - No Framework

I have an SPFX Web Part (No Framework) and would like to add an onClick event to my which will call my function swap(). Code: export default class ExpandableIFrameWebPart extends ...
2
votes
1answer
70 views

SPFX and React : Component not rendering correctly because of findDOMNode returns null

I am a new React learner, and I may have a situation with render() and findDOMNode. What I have and what is the wrong behavior : I'm quite new to React so, I may have done lots of mistakes there. I ...
3
votes
1answer
285 views

SPFx Custom Property Pane

I had created a SPFx web part. The web part contains a Property Pane Custom Field, which returns a string. Now, when I hit apply button on property pane, my custom property gets the data and render it ...
5
votes
1answer
179 views

New Communication site Template supports Multilingual Content

we have a requirement to use new Communication Site template and build a web site, but it should be multilingual. Since new Communication site look and feel and responsiveness suit to my client ...
0
votes
1answer
1k views

set office ui fabric datepicker format

How to set date format in UI-Fabric DatePicker component ? my code here <DatePicker firstDayOfWeek={firstDayOfWeek} strings={DayPickerStrings} placeholder="select date..." /> I ...
1
vote
4answers
39 views

function to retrieve the list item based on todays date

private _getListData(): Promise<ISPLists> { Date.prototype.addDays = function(days) { var Date = new Date(this.valueOf()); Date.setDate(Date.getDate() + days); return Date;...
0
votes
1answer
20 views

To retrieve the list items based on todays date

import { Version } from '@microsoft/sp-core-library'; import { BaseClientSideWebPart } from '@microsoft/sp-webpart-base'; import { IPropertyPaneConfiguration, PropertyPaneTextField } from '@...
1
vote
0answers
37 views

To get the items from the list based on todays date [closed]

private _getListData(): Promise<ISPLists> { Error: A function whose declared type is neither 'void' nor 'any' must return a value. Promise iam getting an error. The above 'Error' is my ...
1
vote
1answer
16 views

To retrieve a single list item by using current date or todays date

private _getListData(): Promise<ISPLists> { Date.prototype.addDays = function(days) { var Date = new Date(this.valueOf()); Date.setDate(Date.getDate() + days); return ...
4
votes
1answer
913 views

Multi language support for Client Side webpart with New SharePoint Development Framework

I have created a sample Hello world webpart using the Examples provided at Office site Webpart has a Property called "Description" in Property Pane which displayed in English Language. I would like ...
0
votes
1answer
44 views

Workbench issues with spfx 18.2 and react 16.8.4

I have recently updated a number of modern spfx webparts to spfx 18.2 and this morning when I try to debug in workbench (locally and on tenant) I am getting serve errors in relation to react and react-...
4
votes
1answer
604 views

How do I get Terms from termstore using SharePoint Framework?

I want to fetch terms from termstore, in my SharePoint Framework app. I have tried this microsoft sample: https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/knockout-taxonomy I ...
1
vote
2answers
33 views

Error: AADSTS65001: The user or administrator has not consented to use the application

I am trying to install webpart with permissions to users and groups in Microsoft Graph. I use "@pnp/graph" to comunicate with Microsoft Graph API. "webApiPermissionRequests": [ { "resource": "...
0
votes
2answers
46 views

Display Rich Text in SharePoint Online

I am trying to display the rich text in a list item . I tried using the JSON formating, but it does not seem to have any support for "Enhanced rich text". The txtcontent converts the rich text to ...
0
votes
0answers
26 views

New spfx web part (1.4.1) requests WsaUpload.ashx, gets 403

I just generated a new web part using the Yeoman generator for SPFx 1.4.1, and am debugging it in the hosted workbench. We are using SP2016, On Prem. I am seeing console logging that looks like this: ...
2
votes
1answer
59 views

spfx office fabric ui CSS is not working

I just now upgraded SPFX from 1.7.1 to 1.8.2. I have referred office fabric UI css class like ms-grid, ms-GridRow, ms-u-md6 etc... before upgrading everything is working fine. But know office fabric ...
1
vote
1answer
451 views

Web part not available to add in the Workbench which is hosted on SharePoint Library

I am building my first SharePoint client-side web part (Hello World part 1). Everything works perfect no issues with the following. Successfully set up Machine with NodeJs, Gulp, Yeoman etc Got the ...
0
votes
1answer
31 views

Why I am not able to authenticate with Microsoft Graph Explorer through Sharepoint Custom Web Part only in Edge Browser

I have deployed a custom web part on sharepoint online, in which I am authenticate with Microsoft Graph Explorer. It is authenticated through Sharepoint Custom Web Part successfully in Chrome, IE and ...
0
votes
1answer
30 views

SPFX create and use an array

As a newbie to SPFx, how do I create and use an array? everything I've tried fails to populate the array. let CustomerList: Array<any> = ['1', '2', '3']; let array1: any = ["Panda", "Zebra", "...
4
votes
2answers
977 views

Asynchrounously load lookup column values in an SPFX/PNP-JS-CORE editform

I'm working on a spfx app to be used as a SharePoint list form. The app will be used to edit ha a LOT of lookup columns. the lookup columns are rendered as dropdowns in the react component. I am ...
5
votes
3answers
8k views

How to retrieve pageContext in SPFx?

I'm following the second tutorial from the SharePoint Framework dev center: Connect to SharePoint It states that you can retrieve details from this.context.pageContext, however this is no longer the ...
0
votes
1answer
84 views

Getting Minified React error #31 when trying to view SPFx webpart in Internet Explorer 11

We have SPFx webpart on version 1.8.2 using React version 16.7.0. When we test the webpart on Google Chrome it works perfectly fine. But when we test it on Internet Explorer 11 it shows error in ...
4
votes
1answer
350 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 ...
4
votes
1answer
910 views

Using ADAL with SharePoint Framework

I've setup a web part with SharePoint framework that requires access to the Microsoft Graph for displaying the recently used files. I've followed the instruction here: https://github.com/SharePoint/...
1
vote
1answer
256 views

Steps to setup SP2016 onprem with React using SPFX

I am trying to setup SP2016 onprem with React, using Yoeman generator @microsoft/sharepoint. I am getting errors when I run gulp serve. Need Help on setting up this project using SPFX. I have ...
1
vote
2answers
110 views

SPFx webpart with Bing Maps

I have SharePoint 2019, and I am trying to create a webpart that will display Bing Map, I tried this on a react app created using create-react-app, and it works fine. Then I took the code, and added ...
0
votes
1answer
1k views

WebParts keep loading untill I scroll down the page or perform a zoom

environment:SharePoint online;Sharepoint Framework; Programming languages:TypeScript During page loading, sharepoint custom web part keeps on loading Nothing does change untill I scroll down the ...
0
votes
2answers
39 views

How to create common scss file in SPFx solution?

I have created SPFx solution which contains multiple webparts (Four webparts in 1 solution). All the webparts design are similar but with different logic. Right now, I have created a duplicate file ...