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
2k 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 ...
0
votes
0answers
26 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)...
2
votes
2answers
1k views

How to make a POST call to Microsoft Graph in SPFx (using MSGraphClient)?

I have difficulties to find code samples of POST calls, using the MSGraphClient. The only one I find is using the already deprecated graphHTTPClient ( https://docs.microsoft.com/en-us/sharepoint/dev/...
0
votes
1answer
73 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
70 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 ...
4
votes
1answer
975 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/...
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
23 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
2answers
26 views

Variable for theme text color

I have a custom web part that I want to have styled correctly no matter what color theme is installed on the site. I have this working correctly for my button background colors like this: .myButtons {...
2
votes
1answer
759 views

Add Dynamic Property Panes to SPFX

I know this has been asked 1000 times, but i've tried everything in the first 2 pages of google so i've decided to come to you guys for help. I'm trying to create some dynamically added property ...
4
votes
2answers
1k 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 ...
0
votes
2answers
234 views

How to stop gulp serve / workbench?

I just started my first SPFx project on SharePoint 2016. After I key in gulp serve the workbench prompt up. My question is, how to exit the workbench? In my DOS prompt it seems gulp is still ...
0
votes
1answer
78 views

Image Carousel Video Autoplay true or False

I want to set autoplay true if it is video and false if it is image. I tried using setState inside autoplay as given below but it is throwing an error: autoPlay={this.setState({ autoplayvideo: true ...
0
votes
2answers
80 views

import interface in mystrings.d.ts

I want to add multiple languages to my spfx web part. Now I want to import some interfaces to my mystrings.d.ts declaration file. But when I do that it breaks the definition and I get a lot of errors ...
0
votes
1answer
72 views

Image Carousel SPFx webpart with video as a source

I want to bind a video in carousel with source which is a hyperlink in the carousel. I am able to bind images but not able to bind video as a source. How do I load videos with images? <div style={...
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
76 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 ...
1
vote
0answers
222 views

Create list view webpart using office UI fabrics in SPFX

I want to implement same list view webpart as given in this Office fabric component example article. They have provided code for the same but I don't know how to implement this code. I have created ...
0
votes
1answer
93 views

on click change Document card color SPFX

I have developed a webpart where on hover i am changing the color of document card office fabric component and on click of document card i am showing grid ,but i am not able to change color of ...
0
votes
1answer
42 views

Auto play false Image Carousel SPFX webpart

I have created image carousel SPFx web-part which is set as auto-play equal to true and on click of image there is modal pop up, its working fine. But when I click on image my modal pop up open but ...
0
votes
0answers
21 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
2answers
347 views

Handlebars with spfx, Module not found

I am trying to use handlebars in a client webpart using these posts: https://n8d.at/blog/how-to-use-handlebars-in-sharepoint-framework-projects-spfx/ https://n8d.at/blog/first-handlebars-web-part-in-...
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
0answers
87 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 ...
2
votes
1answer
4k views

SPFX: How to add item in SharePoint list with attachment?

I have created a SPFX webpart to add item in list with attachment. How to add item with attachment ?
0
votes
1answer
14 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
18 views

Modern SharePoint client side webpart code repo

I am wondering, if the OOB SharePoint Client Side webparts are open source or not? Let me give you a background, why I came to this point. I created a MS Flow manually triggered, added Column ...
0
votes
1answer
153 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.
1
vote
1answer
38 views

Options to deploy SPFx webpart - SharePoint Online

What are all the options to deploy SPFx webparts to a SharePoint Online environment? Is it always necessary to have the .sppkg uploaded to the SharePoint App Catalog? What is the recommended ...
1
vote
2answers
59 views

Home page get blank when spfx webpart added

I have one custom SPFx webpart which fetches the event from calendar. the webpart is working fine but when I place the webpart on home page communication site. the home page shows blank. If i add the ...
1
vote
0answers
55 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 ...
3
votes
1answer
73 views

Sharepoint Item rest query How to get the multiline column value which has append text property set true

I have a multiline column named as "Notes" in a list. This column has the "append text" property set to true. So when I retrieve the item I am getting this column null value. Please help me query this....
3
votes
1answer
710 views

SPFX and react-router

I'm having trouble getting react-router working on my SharePoint Web Part with React and TypeScript. I have tried react-router as a standalone webapp and it works fine. Just can't get it working on ...
0
votes
1answer
72 views

Add new list item using pnp/sp

I have an SPFX client web part that opens a dialog box containing a couple of textboxes, and when the user clicks Ok, I want the contents of that dialog box added to a list as a new list item. The ...
0
votes
1answer
36 views

Argument of type '{ description: string; siteurl: string; }' is not assignable to parameter of type

For SPFx running gulp serve getting below error. For this line it was working before: public render(): void { const element: React.ReactElement<IReactGetitemsProps > = React.createElement( ...
0
votes
1answer
290 views

Image Carousel Spfx webpart

Hi I am working on SPFx image carousel web-part using react responsive carousel. I want that if user click on image on carousel it will show detail description of image in modal dialog on same page: ...
2
votes
1answer
315 views

How to Get Site-users and Site-groups in SPFx using PnP-JS?

How to get the site users and site groups in SPFx using PnP JS? Thanks in advance.
0
votes
0answers
39 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
34 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
36 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
2answers
229 views

SPFX webpart “Deploying a domain isolated package on a site collection app catalog is not supported.”

Getting an error like on SPFX webpart "Deploying a domain isolated package on a site collection app catalog is not supported."
0
votes
2answers
67 views

How to find out is a current user in a group [duplicate]

I need to find out whether a user is in a group. If he is, then I could show or hide properties. I have the below code, can this be used or adapted to find out whether a user is in a 'manager group'? ...
0
votes
1answer
144 views

SPFx React REST API 403 error

I have created SPFx webpart with React. I am calling REST API to get documents from document library and it's work perfectly in workbench but in SharePoint page i am getting error 403 - Forbidden ...
0
votes
1answer
100 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 ...
1
vote
2answers
118 views

Get\Set multiple list data form SP On-Premises site to SP online site Using SPFx webpart

I have one SharePoint On-Premises site which is accessible outside of my server. I already have few lists & libraries created on that site which I am using. I have one Office 365 SharePoint ...
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
25 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
27 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. ...
2
votes
1answer
25 views

Is there something like “View Customizer” in SPFx?

There is Tiles example on Github. But this is JSON Column Formatting. Is there a way to have more control above View rendering from SPFx web-part? I know field customizers can change behavior for ...