Questions tagged [spfx]

General technical questions about the SharePoint Framework client-side development model.

Filter by
Sorted by
Tagged with
0
votes
0answers
8 views

How to fetch Calendar Events (exchange server) on SharePoint 2019 onPrem (preferably on spfx webpart)?

I want to fetch individual users outlook events on SharePoint 2019 onPrem webpart (i'm using spfx to create webpart). I am aware it can be done using Graph API on SharePoint Online, but I am trying to ...
0
votes
0answers
10 views

Audience targeting SharePoint list with Sharepoint REST API

I have question regarding audience targing for SharePoint List and Sharepoint REST API. When we enable target audience SharePoint List Item will be view by define target audience only and it will work ...
0
votes
0answers
8 views

Having null result whenever using dom selectors in spfx webpart

Trying to get the tsx video tag duration by selecting the tsx tag through dom selectors but getting null in the console
0
votes
1answer
33 views

SharePoint hosted workbench showing cached version

I have a SharePoint SPFx react web app. When running gulp serve on my local workbench, all changes are being reflected. However when I access the SharePoint hosted workbench using the following URL: /...
0
votes
0answers
8 views

spfx in Teams App does not use token cache

spfx token always expired within the Teams App. So it doesn't seem to get the token from the cache. e.prototype._isTokenExpired = function(e, t) { if (void 0 !== e) { ...
0
votes
1answer
23 views

How to call an API request in the .ts file spfx not the main component

This is my web part below, I need to call an API so I can dynamically populate the scope property dropdown that are provided as 'settings' to the web part. Can I use componentdidmount? Doesn't seem to ...
0
votes
1answer
21 views

Sort items inside my React.Js SPFx web part

I have a SharePoint list, and i want to order the items based on the "Featured" field, but things is not working, where if i define this ordering logic:- a.map(b => { if (b ===...
1
vote
0answers
18 views

How I can force a table <TD> to occupy the full vertical space? [closed]

I want to show 3 boxes of content inside a table inside my SPFx react web part:- I have the following code:- singlenews.tsx:- import * as React from 'react'; import styles from './SingleNews.module....
0
votes
1answer
17 views

Unable to render a table with rowSpan inside my SPFx React web part [closed]

Inside my ReactJs SPFx web part i want to build a table as follow:- <table style="width:100%"> <tr> <td rowspan="2"></td> <td></td> ...
0
votes
0answers
17 views

Show 3 boxes inside 2 columns instead of 3 columns inside my SPFX React sharepoint web part

I am trying to achieve this layout inside my SharePoint SPFx web part:- But currently i have this layout:- Here is my full code and description:- I have a custom list inside my SharePoint online ...
0
votes
0answers
6 views

How i can make a copy of our SPFx web part one version for UAT other for Development inside the same App Catalogue

I have developed an React SPFx web part for our Development SharePoint online site. I want to make another copy of the same SPFx to add it inside the UAT site collection. So my question is; what are ...
0
votes
1answer
29 views

Function wait for a loop before returning value in javascript

My function return value of an array before pushing value into array. private async getPPickerid(ppvalue,AssignedToIdArr):Promise<any> { return new Promise<any>((resolve, reject) => { ...
0
votes
0answers
12 views

Inside the SPFx web part, how i can get the current site collection url inside the "SharePoint/assets/elements.xml"

I am working on an SPFx web part, which inject a custom css inside the site collection. Now i define the location of the custom css file inside the ClientSideComponentProperties inside the SharePoint/...
0
votes
1answer
9 views

Help with post request from SPFx secured by AD

https://docs.microsoft.com/en-us/sharepoint/dev/spfx/use-aadhttpclient-enterpriseapi < I have a few GET requests working in my SPFx app, but the guide here doesen't show you how to do a POST ...
0
votes
1answer
35 views

Issues with Hello World project for SharePoint 2019

I have the following versions on my machine: +-- @microsoft/generator-sharepoint@1.4.1 +-- gulp@3.9.1 +-- typescript@2.4.0 `-- yo@3.1.1 Scaffolding in Yeoman, I have selected the option SharePoint ...
0
votes
1answer
31 views

SharePoint Online SPFx Web Part Issue

Your web part will not appear in the toolbox. Please make sure "gulp serve" is running in a web part project. Please refresh the page once "gulp serve" is running.
0
votes
0answers
11 views

Compiling Less to CSS in SPFx

I am developing a SharePoint web part using SPFx. In the web part, I extend the webpack configuration to enable Less-to-CSS compilation, but it does not work. Can you please help to indicate what ...
0
votes
0answers
16 views

Multi Level Navigation on SharePoint Online

I would like to create multi level navigation or tree view on SPO from Site Pages. But from the Global navigation or site navigation, only two level is possible like Parent1 --Child1 --...
0
votes
1answer
26 views

Available options to build a custom search page with Tabs + Filters

I have a hub site which have 5 sites connected to it. now we are trying to build a custom search page as follow:- with these main features The search should only search the Hub site + the sites ...
0
votes
0answers
12 views

Microsoft SharePoint Foundation Subscription Settings Service stuck on "Stopping"

Stopping "Microsoft SharePoint Foundation Subscription Service" in SharePoint 2016 Server by using Power-shell command but it stuck at below line and not responding. Remove-...
0
votes
1answer
38 views

How to get the current Page title >> then filter list items based on it inside my SPFx web part

I have a custom list named CompanyNews which contain these fields: Title --> Free Text Topic ---> choice which allow multiple selections Where inside the custom list, we will be adding the ...
0
votes
0answers
10 views

Passing array connected webparts using IDynamicDataCallables

I am trying to connect 2 webpart components in the same solution, and pass an array between the source and consumer components, however I just can seem to get it to work. What the project does is ...
0
votes
2answers
21 views

Unable to install Microsoft sharepoint generator in MacBook pro

I am getting below error and messages while trying to install Microsoft SharePoint generator in MacBook pro: npm WARN notsup Unsupported engine for @microsoft/generator-sharepoint@1.13.0: wanted: {&...
0
votes
3answers
26 views

The data in API does not shown in the web part for User

I am very new to SPFx web part creation. I have created simple SPFx web part using typescript. Added package to app catalog then added in my page. The issue that I am facing is user doesn't read the ...
2
votes
1answer
24 views

Filter by field customizer column

I have an SPFx field application customizer that renders some custom text in a column. The column is created with a feature in the extension. Is it possible to filter on that text in the list later on?...
0
votes
0answers
26 views

Modify my SPFx web part to read css file instead of writing the css code inside the web part

I have built a web part which is similar to this web part from github @ https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-enhanced-list-formatting . The web part allow to embed custom ...
1
vote
0answers
30 views

Set Focus on Office-UI-Fabric-React Control in Dialog

I'm trying to set the focus on a UI Fabric ListItemPicker in a UI Fabric Dialog when it opens. I'm using the following code: export default class MslTownProfilesWebPart extends React.Component<...
0
votes
1answer
31 views

"gulp serve" is returning this error "Cannot GET /temp/workbench.html" when open "https://localhost:4321/temp/workbench.html"

I want to create an SPFx web part, so i run these commands:- yo @microsoft/sharepoint gulp serve then when i try to run gulp serve, i got this error:- Cannot GET /temp/workbench.html here is the ...
0
votes
1answer
78 views

"gulp serve" will return this error "ReferenceError: primordials is not defined"

I have 2 versions of node.js, as follow:- Your environment has been set up for using Node.js 17.1.0 (x64) and npm. C:\Windows\System32>nvm list 16.13.0 8.16.2 Now i am trying to run gulp ...
0
votes
1answer
18 views

Can i donwload an App from the App Catalog and install it inside another tenant

I have developed a custom SPFx web part and upload it inside a tenant, as follow:- now i want to install the same App inside another tenant, so can i simply download the above sppkg App and install ...
0
votes
1answer
44 views

How to defer executing JavaScript file in SPFx solution

In a SPFx solution, I'm importing a JavaScript library like this: import './javascriptfile.js'; This JS file gets executed before the DOM is ready. If we are using a SCRIPT tag, we can use defer ...
1
vote
0answers
36 views

Are there any available SPFx web part which can allow to inject custom CSS files inside modern pages, without the ability to inject custom JavaScript?

I am starting this new project for a SharePoint Online tenant: The client has created 10 modern pages that will be defined as templates. Inside each of the 10 modern pages we need to inject custom ...
0
votes
0answers
16 views

How i can get the Web Part properties from a sharePoint list intead of getting them from the Web Part's PropertyPaneConfiguration

I have built a Web Part which have the following:- Inside the Web Part settings page >> there are 2 fields named as "Who We Are" & "Our Value" which allow the user to ...
1
vote
1answer
28 views

Can we restrict adding our custom React web part to the site collection home page only

I have developed a custom web part using these steps for our SharePoint online communication site:- md spfx-MyModalPopup cd spfx-MyModalPopup yo @microsoft/sharepoint Chose SharePoint online + ...
0
votes
1answer
30 views

Is there any security issue in using dangerouslySetInnerHTML to render HTML Code inside our React.js sharepoint modern web-part

I am trying to build a React JS SharePoint modern web part, which have the following capabilities: Inside the Web Part settings page >> there are 2 fields named as "Who We Are" & &...
1
vote
1answer
23 views

Page Redirection in SPFX React App

What is the easiest way to redirect to another page in an SPFX React app? My App is fairly simple with only 2 pages each with a web part. I want to redirect from the home page to another page with a ...
0
votes
0answers
33 views

Can I show a Rich Text inside Popup for our SPFX web part instead of Plain-Text

I want to build an SPFX web part which render 2 buttons and when the user clicks on the buttons, 2 Popups should be shown + have 2 fields ("Who We Are" & "Our Value") to enter ...
0
votes
1answer
23 views

How i can define 2 .tsx files where each file render a different text

I want to build an SPFX web part which render 2 buttons and when the user clicks on the button 2 popup should be shown + have 2 fields to enter the 2 Popups text, something as follow:- So i did the ...
1
vote
2answers
91 views

SPFx web part to add Text and show it inside a Popup when clicking on a button

I am trying to achieve this using SPFx web part: The web part will provide a Button and a Text field. The user add the Web Part >> edit it >> enter the text inside the text field (inside ...
1
vote
0answers
27 views

Error - [tsc] node_modules/@fluentui/react/lib/components/ContextualMenu/ContextualMenu.types.d.ts(13,35): error TS1005: ';' expected

I am trying to develop this SPFX inside our SharePoint online site @ Model pop up in SPFX Where I did the following steps, but I got the below errors:- Your environment has been set up for using Node....
1
vote
1answer
21 views

Remove user from site group using PnP-SP in JavaScript

I'm trying to find a way to remove a user from a group using PnP-SP. My code is as follows: this.$pnp.sp.web.siteGroups.getById(this.selectedGroup.Id).users .remove(user) ....
0
votes
1answer
21 views

Is there a way to show Quick Links were some of these quick links open in a modal popup

I want to add this Quick link inside our SharePoint online: Where the HR System & Our People will open links from external system and a SharePoint page. while when the users clicks on Who we are ...
0
votes
1answer
941 views

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'substring')

I am using PnP JS in SPFx to get page content. I wanted to get content type id of the page and check if it belongs to certain content type. I can't seem to make contain or includes function work so I ...
0
votes
1answer
25 views

Can we force the built-in Weather modern web part to dynamically show the Weather for the current user location.If not is there any other alternatives

We have a modern communication site inside SharePoint online tenant and we want to add a modern web part to a modern page to show the Weather of the login-in User location. Now we added the built-in ...
0
votes
1answer
41 views

SPFX Field Customizer: how to get Id of item in list?

My question relates to SPFX Field Customizer: how to get full path of document in document library?. How to I get the Id of the item on which the Field Customizer applies? I have tried: event.listItem....
0
votes
0answers
95 views

The service worker navigation preload request was cancelled before 'preloadResponse' settled

I'm getting this error after I build and deploy my SPFX project. The error message goes on to say: 'If you intend to use 'preloadResponse', use waitUntil() or respondWith() to wait for the promise to ...
0
votes
1answer
353 views

This generator (@microsoft/sharepoint:app) requires yeoman-environment at least 3.0.0, current version is 2.10.3

I am getting the following error when trying to use yo @microsoft/sharepoint Error @microsoft/sharepoint This generator (@microsoft/sharepoint:app) requires yeoman-environment at least 3.0.0, current ...
0
votes
0answers
15 views

Can we refer/add SPFx Library Component to SPFx Project from particular Site Collection?

I created SPFx Library Project & deployed in POC Site Collection, I created another SPFx Webpart Project & deployed at tenant level. When I tried to add the webpart on any site other than PoC ...
0
votes
3answers
30 views

How to get the file length using PnP JS?

I know how to get the file size using REST API, basically this here: https://tenant.sharepoint.com/sites/site_name/_api/web/GetFileByServerRelativePath(decodedurl='/sites/site_name/Lists/ListName/...
1
vote
0answers
12 views

If I mouse over the hyperlinks, it's showing a full link on the webpage itself. How to overcome this?

If I mouse over the hyperlinks, it's showing a full link on the webpage itself. How to overcome this?

1
2 3 4 5
33