Questions tagged [spfx-webparts]

Technical questions about building and using web parts based on the SharePoint Framework client-side development model.

262 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
0
votes
0answers
101 views

Depolying SPFX Web Part on On Prem 2019

I used the example from the Microsoft site. I used the 2019 and Online option and added nothing extra to the project. I packaged and published the web part. I was able to deploy it to our companies ...
0
votes
2answers
31 views

Sharepoint Online - Upload Web Part Site AppCatalog - Deploy Error

I have a simple web-part Hello Word from the tutorial of "Build your first web part" from Microsoft. However, every time I upload web part, the column "Deployed" is checked to "No", but column "Tenant ...
0
votes
1answer
70 views

Properties how pass them array value

I want to ask how pass a array value to the properties. Always at first should be 'properties name', but I have got a lot repetable names. So I want give them to the Array. How I can pass them ? If I ...
0
votes
0answers
23 views

Search two different search boxes of List columns related data show on grid view based on text enter in SPFX?

Am able to search the PR_Number column data, the same i want to search for Description as input in another search box and show the gridview in SPFx. import * as React from 'react'; import * as ...
0
votes
0answers
27 views

SPFx Document Web Part Deprecated?

I am trying to extend the functionality of the Documents web part I have been trying to gulp serve this: Documents Web Part. But it is over 2 year old and localhost refuses to work (ERR_SSL_PROTOCOL)...
0
votes
1answer
108 views

Get User Photo, Name &Title of an office 365 group using SPfx

I am trying get the user details i.e. UserName, Title and Profile picture of users that belong to a office 365 distribution group. I tried this code sample, but I get an undefined error: ...
0
votes
0answers
79 views

SPFX and react-dnd

I promised myself never to write a StackExchange post with lots of code. But here we go. I am basically trying to get some basic drag-and-drop behavior working in an SPFX (1.9.1) web-part using ...
0
votes
0answers
13 views

SCSS in Sharepoint Framework Library Project

Looking for the proper way of constructing my projects. I decided to use one project per web part however is have a number of classes and react components that are common to all projects. So I ...
0
votes
0answers
24 views

SharePoint App - SPFX Webpart - Access list on site to which user does not have access

I am working in SharePoint Online. I am trying to make a SharePoint SPFX webpart that : Will be added to a modern page in some site collection, let's call it SiteA Will read the contents of a ...
0
votes
1answer
184 views

Getting SharePoint news using rest API in SharePoint Online

Is there any rest API available to get the recent updates or news related to a site in SharePoint Online? How To Read The SharePoint News Using Rest API In SPFx I have found above post but it does ...
0
votes
0answers
3 views

Import locale key from component

i have a few components where i export a string as identifier for each component. At the root of my webpart "webpartname.tsx" i dynamicly load different components and there i reuse the exportet ...
0
votes
1answer
106 views

SPHttpClient undefined error: Using React JS to add item in SharePoint list

I'm trying to add an item in SharePoint Online list using SPFx solution where I'm using React JS to perform the action. Below is the copied code, when debugging it says that: "VM242:1 Uncaught ...
0
votes
0answers
24 views

News webpart layout breaks on resize while hidden

I have written a wrapper for native SharePoint online News web-parts which combines them into a tabbed layout. A result of this is that a number of the web-parts are hidden most of the time. If the ...
0
votes
0answers
114 views

Connect to Common Data Service API from SpFx

We are interested in connecting to the Common Data Service API from a SpFx webpart which can be done via Postman using the following application ID: '00000007-0000-0000-c000-000000000000': 'Dynamics ...
0
votes
1answer
15 views

How undo the “revoke access” in yammer applications

i cloned a spfx project from https://github.com/SharePoint/sp-dev-fx-webparts/tree/master/samples/react-yammer-api and it basicaly search for a name of the user in yammer and return some informations ...
0
votes
1answer
209 views

How to retrieve Image column from SharePoint list using React js SPFx

I am trying below TypeScript to retrieve the Image column using SPFx .Unfortunately image is not rendering on page. Please help me on this.
0
votes
0answers
50 views

CSS classes added in project.module.scss not showingUp in my .tsx file in SPFx Project

Currently I started working on React SPFx webparts and wanted to add some new CSS. I added some styling to classes in Project.Module.scss. But Now when I am adding this class names in render() method ...
0
votes
1answer
45 views

How does trending feature in Highlighted Content Webpart Work in SharePoint Online

We have utilized Highlighted Content Webpart in our organization and as a filter we are using Trending. I was wondering how does that feature work and how often does it update and what actions is it ...
0
votes
1answer
38 views

Not able to get the Category from calendar event

I am using a SPFx react web-part to get the events from calendar. I am expanding the calendar events however could not able to get the Category column. Here is the code I am using: public ...
0
votes
1answer
119 views

SPFX - Client side solutions cannot be used in this location

I am facing below issue while adding SPFx package file in App Catalog: Client side solutions cannot be used in this location. Update: I am adding package file in "Apps for Testing" library. "Apps ...
0
votes
0answers
19 views

How to save permanently web-part to a Site template

Some of my web-part should be always Visible on the sites. Could You please tell me how to prepare site template to have some web-parts visible on the site. How to prepare a site which after load ...
0
votes
1answer
21 views

SP 2010 Site Collection Migration to SP 2013 On-Prem to SP 2016 On-Prem to SP 2019 On-Prem | Moving from Classic to Modern Pages

I am new to an organization that is making the move from SP 2010 to SP 2013 to SP 2016 to SP 2019. These are all on-premise versions. The site collection has almost 3500 sites. There are lots of ...
0
votes
0answers
26 views

SPFX rest api taking time to bind data on click

Hi i have wriiten function on click of button i am calling this function to bind data in table but it taking some time to bind, data also less it should not take time. i am using multiple rest call ...
0
votes
0answers
29 views

Apply CSS to PropertyPane - SPFx

I want to apply CSS to a label of PropertyPaneTextField in SPFx react webpart. I tried adding a custom .css file in Components folder and made it required in my .ts file But that did not help. ...
0
votes
2answers
91 views

response.json return problem - undefinied

I have got problem with response . json() return problem. I have got two methods one is Mocking List, and another is by JSON. Mock method works superb. but return from response.json() returned me ...
0
votes
0answers
155 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
0answers
125 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 ...
0
votes
0answers
34 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.
0
votes
0answers
80 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 ...
0
votes
3answers
828 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 ...
0
votes
2answers
485 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
228 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: ...
0
votes
1answer
262 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
83 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
2k 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
1answer
46 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
398 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 ...
0
votes
0answers
304 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 ...
0
votes
1answer
23 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
308 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
1answer
350 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
874 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
133 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 ...
0
votes
1answer
99 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 ...
0
votes
1answer
158 views

Problem with SPFx TypeScript json.value.map(k,i) & query via getuserbyid()

Firstly I'll start with extra question: I'm trying to get data by _api/web/getuserbyid() API call in code. Do You guys know why there is no option for filtering by query for specific data? I mean by: ...
0
votes
0answers
46 views

Problem to see webparts with users without privileges

I'm using sharepoint online webparts created with react I'm developing webparts for sharepoint, at first I tried with an empty webpart, just the auto generated one with yo @microsoft/sharepoint, ...
0
votes
0answers
548 views

SPFx TypeScript json response from spHttpClient as array

i want to get data to WebPart from the SharePoint list. but some of the data are eg. PeoplePicker or Multiple line of text and I have result shown as: <div class="...
0
votes
1answer
35 views

Cannot delete the App added in Site Contents

We added a SPFX App in a SharePoint 2019 on-premise environment but somehow got an error. The problem is we cannot remove the app from the Site Contents. What possibly is the cause and how can we ...
0
votes
0answers
109 views

How to use HoverCard of Office UI Fabric in Custom SPFX People Webpart

How to use HoverCard of Office UI Fabric in Custom SPFX People Webpart? I am developing a custom SPFX webpart where i would like to mimic the behaviour of the current modern 'People' webpart ...
0
votes
0answers
354 views

Adding an Spfx client side webpart on a classic page

I am on SharePount on-premise 2016 with "September 2017 Public Update for SharePoint 2016" deployed and the configuration database is greater than 16.0.4588.1000. The site is running on https I ...