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
2answers
36 views

get sharepoint list with pnp

I want to get a sharepoint list and assign it to my list 'items' which of type is IExampleItem, but I don't really know how to do it; I tried the following code but it gives me an error, my list '...
0
votes
1answer
21 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
43 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
0answers
19 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
28 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
17 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
29 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....
0
votes
0answers
13 views

Drag n Drop API not working as expected

I am working on a project on which user will drag a text from webpart(e.g. webpart1) & dropping the same text into other webpart(e.g. webpart2) . I am referring This link as reference . Based on ...
1
vote
1answer
46 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
40 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 "...
0
votes
1answer
43 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
32 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 ...
0
votes
0answers
30 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
2answers
197 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
1answer
86 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
0answers
13 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
1answer
88 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
65 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 ...
0
votes
1answer
27 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
4answers
59 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;...
1
vote
1answer
20 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 ...
3
votes
1answer
43 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 ...
1
vote
3answers
57 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 ...
0
votes
1answer
137 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-...
1
vote
2answers
38 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
89 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
50 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
121 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 ...
0
votes
1answer
40 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
39 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", "...
0
votes
1answer
33 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,...
0
votes
1answer
883 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 ...
0
votes
2answers
52 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 ...
1
vote
0answers
36 views

Correct and reliable way to load bootstrap in SPFx webpart

ello, I know there are couple of ways to load bootstrap in our SPFx webpart. But it seems there is some inconsistency on how to add its reference in webpart.ts I am trying to load bootstrap.min.js ...
0
votes
1answer
49 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 ...
0
votes
1answer
13 views

Call child component method in parent and visa versa

how can I call a parent components methods from child or visa versa. I'm using reactjs and typescript in spfx webpart. Or should I use helper classes to call methods of another classes from anywhere?...
0
votes
1answer
52 views

Get another user info using PnPJS with SPFx

I want to get a list of items from a SharePoint list, and display them in a specific way in SPFx webpart. I could use PnPJS to get Text and Number fields, but for the Author field, I am only getting ...
1
vote
1answer
186 views

Anyone can explain the .ts file and .tsx file use and difference in SPFx react webpart?

In SPFx No JavaScript Framework webpart contain "webpart.ts" file and write code in it. But in React SPFx webpart, there are 2 file : 1) webpart.ts file 2) webpart.tsx file in component folder. ...
0
votes
0answers
47 views

SPFX PeoplePicker value and retaining initial selection

Looking to see what is going on here, I've recently started using React JS in Modern SPFX Web Part development and have come across a bit of an issue with the @pnp js SP React Control for ...
1
vote
1answer
40 views

Calling a custom web API secured with Azure AD from SharePoint 2019 on-premise

I need to call custom web APIs secured with Azure AD from my SharePoint 2019 on-premise SharePoint Framework solutions. As far as I know, this scenario and calling graph APIs are only supported in ...
0
votes
1answer
20 views

Sharepoint sp start kit webparts question.Is there a script/content editor webpart?

I have provisioned the starter kiton my tenant and its really impressing with some additional webparts included. see below https://github.com/SharePoint/sp-starter-kit But can we still get the ...
0
votes
0answers
80 views

Making a div full screen in SPFx webpart deployed in SharePoint Online

I need to make a div full screen (in web page) and for that I am using CSS. .divFullScreen { display: block; z-index: 9999; position: fixed; width: 100%; height: 100%; top: 0; ...
0
votes
0answers
109 views

react-search: The type definition `index.d.ts` does not exist. Create one and try again

I am new to SharePoint and I'm trying to deploy a modern Search Web Part following the instructions here sp-dev-fx-webparts/samples/react-search/ When I run tsd install on the command prompt, it ...
0
votes
0answers
379 views

Show Modal dialog in full page SPFx

I have created a web-part which search the images from library and shows the result. when I click on image it should show in the popup as preview however it shows withing the iframe only instead of ...
0
votes
0answers
39 views

Using Sharepoint PnP to get SchemaXml and use it while provisioning an SPFx List Instance

I am creating an SPFx Web Part that will provision a list instance upon installation. I have successfully created and provisioned a basic list, however i cannot seem to customize it by altering the ...
3
votes
1answer
47 views

New Webpart development in SharePoint 2013

I need to develop some new web parts for SharePoint 2013, and they should be developed in such a way that they can be easily migrated to SharePoint Online at a later point. The webparts need to ...
0
votes
1answer
54 views

SPFX Web Part Error

I am following below MS article to practise jquery integration with SPFX. https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/get-started/add-jqueryui-accordion-to-web-part Getting below ...
1
vote
1answer
181 views

What is difference between SharePoint Framework (SPFx) Extensions and SharePoint Framework (SPFx) Web PART

I have started working on SharePoint Online. Where I have to use SPFX. What is the Difference between SharePoint Framework (SPFx) Web Part and SharePoint Framework (SPFx) Extensions
1
vote
1answer
182 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://...