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
1answer
141 views

tslint.json unknown compiler option 'extends'

i try to upgrade my WebPart to SharePoint spfx 1.9.1, i follow recommandation generated by o365 spfx project upgrade --output md > report.md, but when i build my project i get two errors : [16:10:...
0
votes
0answers
132 views

SPFX Add webpart dynamically at runtime

I'm trying to render webparts dynamically at runtime. I have almost no experience with react, so this is where I'm stuck (I think). Using pnp-js I can get the webpart definition and manifest like ...
0
votes
1answer
39 views

SPFx webpart with @pnp/spfx and Angular elements not working

I have created SPFx webpart for Angular Elements using below link: https://pnp.github.io/generator-spfx/howtos/angularelements/ Getting error in npm run bundle as below:
0
votes
0answers
87 views

Getting error: “Cannot read property 'getCurrentStack' of undefined”

We have implemented kendo's editor in the SPFx react project. Code: <Editor tools={[ [OrderedList, UnorderedList], [FontSize, FontName, FormatBlock] ]} /> The ...
2
votes
3answers
59 views

How make SharePoint 2019 or Online Modern Communication Sites list view as responsive?

Is it possible to make OOTB SharePoint 2019/Online Modern Communication Sites list view as responsive? I am having a list with 10 columns. Now i am adding this list into my Communication page as ...
4
votes
1answer
1k views

How to run SpFx WebPart in SharePoint Online without running Gulp server in background?

I am new to SpFx and I am playing with SpFx. I am trying the example given here. I am able to follow the steps and I am able to add the WebPart to my SharePoint Page. But after adding, I am facing ...
0
votes
1answer
443 views

How make accordion detail list with UI fabric react

I start with UI Fabric react; I am developing a FAQ; I use for that a list; but the result is not good; I want to do something looks like an accordion, where we can see the question as a header and ...
0
votes
1answer
130 views

Programmatically trigger flow and send properties

I want to manually trigger an external flow from my SPFx project, and at the same time send values to the flow. In flow, I have my request body: { "$schema": "http://json-schema.org/draft-04/schema#...
0
votes
1answer
289 views

SPFX Tiles webpart

Hi I am new to SPFX and react JS , i like to create Tiles webpart from sharepoint list where it will render all properties of tiles from list like icon, colour,text, I had tried using office fabric ...
1
vote
1answer
598 views

SPFx - Using UI Fabric Core Controls without React Framework

Just wanted to check If I am not missing something. I wanted to use Office UI Fabric core controls on SPFx webpart without React component. So basically I have option to use SP Fabric Core. https://...
1
vote
0answers
28 views

React button to open SharePoint Document Picker

I have seen and experimented with the Property Pane controls that allow you to select a document or image from a pane and was curious if anyone has seen this same capability available from a button ...
0
votes
0answers
33 views

How to add Edit webpart button in Teams tab for SPFx like this?

I want this kind of edit web part button in teams tab for installed SPFx web part.
1
vote
0answers
18 views

Question regarding webpart and reading/uploading images

Scenario: I have a Modern Webpart written in ReactJS, it allows user to filter images based on custom attributes that I have in a json file that is mapped to image file names. Currently the images ...
0
votes
1answer
55 views

SPFX: is @pnp/sp get call asynchronous?

I am new with @pnp/sp and I am having problems with my code: public render(): React.ReactElement<IVisualizadorPermisosProps> { var arbol=[]; sp.web.get().then((data)=>{ arbol....
1
vote
1answer
257 views

SHAREPOINT FRAMEWORK - REACT JS alert on Page Load

I am new to SharePoint framework and React JS. I have build a basic Web Part with CRUD operation using React JS. I wanted to show drop-down(html select) value on Page Load in an alert. I am able to ...
1
vote
0answers
151 views

Office ui fabric Dropdown menu does not work on keyboard press

I have SPFX component with React library. The Dropdown menu is working fine with mouse onclick events. however, on pressing enter or space is not working. I am thinking of using eventhandlers such as "...
1
vote
1answer
250 views

SPFX Webpart- “Error initializing application” after refreshing page

SPFX app is created and deployed tenant level. IF it is add to a page at site collection level (ex:https://text.sharepoint.com/sites/ABC) it is working perfectly. If it is added at subsite level (ex:...
0
votes
1answer
127 views

SPFx web part throwing error in SP2019

I have created spfx solution by selecting option which will work in SP Online and SP 2019. I have tested this in SP Online which is working fine. Now I have moved this .sppkg file to SP 2019 app ...
1
vote
2answers
48 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 ...
4
votes
2answers
879 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
64 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
193 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 ...
4
votes
4answers
542 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 ...
1
vote
0answers
69 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, ...
1
vote
2answers
317 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
966 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?
1
vote
1answer
269 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
850 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
147 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
267 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
73 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,...
1
vote
3answers
149 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
440 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 ...
2
votes
1answer
201 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 ...
4
votes
1answer
401 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
193 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 ...
1
vote
4answers
249 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
35 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
38 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
30 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
1k 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 ...
1
vote
1answer
430 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
678 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
185 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
418 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
197 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
465 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
576 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
71 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
203 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", "...