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
0 answers
6 views

SharePoint SPFx Web Part Accessibility Tab Issue

Has anyone had issues with accessibility of components inside of a SPFx web part, specifically when you tab through the UI elements it skips the web part even though it has buttons and anchor links. ...
1 vote
1 answer
17 views

PnP Modern Search. Filter Current user

I would like to be able to display list results to users that only contain their name. I have 2 possible ways I think this can be done, but not sure how. In the Query template section, I have https://...
1 vote
1 answer
15 views

How to count SharePoint list from managed metadata column in SharePoint online?

I have one field manage metadata which name is department and its has 3 value HR, Admin and account so I want to filter out Admin data and display count of results. I am using SharePoint online.
1 vote
1 answer
28 views

Filter on choice column and get raw data count using SharePoint REST API

How to filter on choice column and get raw data count using SharePoint REST API? // const url = `/_api/web/lists/getByTitle('${listTitle}')/items?${countQuery}`; https://contoso.sharepoint.com/sites/...
3 votes
3 answers
2k views

Is it possible to open modern item edit form panel from custom SPFx webpart?

Is it possible to open EditForm panel from my SPFx webpart? Something like in list view, if an item is selected, side panel appears with read-only properties and a button "edit all" enables user to ...
4 votes
1 answer
2k views

How can I force SPFX webpart to not show cached data in SharePoint online

I have created a SPFx webpart which reads parameters from page URL query strings and renders data accordingly. After the page is loaded and I press back button and again access the page with ...
0 votes
1 answer
21 views

Is it possible to customize Validation for delete button of the PropertyFieldCollectionData control

Is it possible to customize the validation when user delete a record in PropertyFieldCollectionData control? I am trying to ask the user "Are you sure you want to delete " When user click ...
0 votes
2 answers
28 views

SharePoint online (SPFx with react) - custom forms?

I'm building custom New and Edit forms. I'm interested if there is some way to get the fields of list displayed on Edit/New that would work by default from SharePoint, or I must rebuild every field ...
1 vote
2 answers
31 views

dynamically show site owners web part

We have over 200 sites. We want to have a centralized list that has all the site owners. We want to have a web part to display the owner of the site. If we edit the list then the web part changes ...
0 votes
0 answers
13 views

SPFx isHtmlString: true on dynamic content (lists)

I'm struggling making web parts with lists on it searchable using SPFx. My static react cards are working just fine based on this solution: How to make SPFx web part content searchable But then for ...
0 votes
1 answer
40 views

SPFx - How to load jsom dependencies in a proper way

I am getting crazy trying to load scripts like Runtime.js and SP.js. In the beginning I added the dependencies in the config.json as mentioned here. As usual, the Microsoft documentation is buggy and ...
1 vote
2 answers
23 views

Is there a way to differentiate between one column and three column?

I need to develop an SPFx web part that can be well displayed in both one column and three columns. How can I optimize the CSS for these two sections? Is there a fixed class in SPO that can ...
1 vote
1 answer
1k views

How to retrieve image from a SharePoint Online Document Library using SPFx using filters

public render(): React.ReactElement<IFlowDiagramProps> { // const docRelativeUrl :string = event.selectedRows[0].getValueByName('FileRef'); var str=""; var usemaps="";...
1 vote
1 answer
15 views

How to show an empty field in the list items instead of NULL in a no framework SPFX?

In the snippet of code from my no-framework SPFX, I'm trying to understand how to not show "NULL" in any of the four fields in the html table. The first three columns are not editable, ...
0 votes
0 answers
22 views

Spfx NoJS framework question with using plugin

I'm working on a spfx webpart and using NoJS for it. The webpart is an imageslider with carousel. I'm going to be using the plugin here The plugin is FancyApps The issue is how to bind the plugin ...
0 votes
0 answers
11 views

How to clear values from the DynamicForm PnP SpFx control?

I am using the DynamicForm control in my SpFX webpart from @pnp/spfx-controls-react. I want to clear the current values in the form when the user either a) adds a new item to the list, or b) clicks ...
0 votes
0 answers
27 views

How to update SPFx web part property pane values using PowerShell scripts?

How to update SPFx web part configuration property pane values in SharePoint 2019 on premises site using PowerShell?
1 vote
0 answers
31 views

Analytics for Web Part Usage (SharePoint Online)

My Question Out of the custom apps and web parts listed in the tenant app catalog, is it possible to get usage analytics for those custom apps and web parts? Ultimately, I am looking to see which web ...
0 votes
4 answers
6k 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
1 answer
41 views

I am using style attribute in React Select but its showing an error in SPFx react. Can someone please tell how to resolve this?

I am using the below code: import Select from "react-select"; <Select className="form-control-sm" name="form-field-name&...
0 votes
1 answer
2k 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
1 answer
2k 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
1 answer
20 views

Looking for an image gallery webpart - that can do carousel but also when clicked on the image display a popup of the image

Looking for an image gallery web part - that can do carousel but also when clicked on the image display a popup of the image. Any ideas or resources online would be appreciated Thanks in Advance.
0 votes
1 answer
2k views

SPFx app not showing up in the webpart list

As I am new to SharePoint Framework, I am trying to update an existing web-part (updated the version in package-solution.json). Updated .sppkg file in app catalog (overwrite), shows new version number....
0 votes
1 answer
1k views

Dynamically Pass List item parameter using pnp js

I have created SPFx web part using React JS framework. I am reading the data from the CSV file and adding item to SharePoint list using inBatch in PnP JS. I was able to add the item to SharePoint ...
0 votes
2 answers
1k views

SPFX MSGraphClient - Cannot read property 'id' of undefined

I am getting this issue when calling Shared and Recent OneDrive files using MS Graph Client on my modern webpart. Uncaught (in promise) TypeError: Cannot read property 'id' of undefined I get the ...
0 votes
1 answer
2k views

Retrieve item ID after adding to SharePoint list using PNPJs

I'm building a SharePoint SPFx react app. In a nutshell, the user fills out a form that I created. When the user hits submit, using PNPJs: https://pnp.github.io/pnpjs/sp/items/ I'm adding the item to ...
5 votes
1 answer
4k 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
1 answer
1k views

How to use people picker control using sp-pnp-js( Pnp-JS-Core) library and save users selection in Person or Group type column in Sharepoint List?

As I am new to Sharepoint framework, I wan to know how can I use the people picker control using sp-pnp-js library and save the users selection in Person or Group type column in Sharepoint List.... I ...
0 votes
1 answer
1k views

Angular 2 Routing in SharePoint Framework - SPFX

Using Angular.IO site's Routing example , I created a simple SPFX webpart with two components Dashboard and HeroDetails. When I try to run it through SharePoint site I see following error. Attaching ...
1 vote
1 answer
274 views

SPFX : Sharepoint list column does not Exists

Error message: The property 'RequesterEmpID' does not exist on type 'SP.Data.XYZListItem'. Make sure to only use property names that are defined by the type. I edited some of the list column names in ...
0 votes
1 answer
18 views

Preview not showing while add SPFx app under Communication site

I have added the SPFx app under the SharePoint Online communication site. When I tried to create a new page from the Home page and select Apps. SPFx app preview not showing. Please refer to the below ...
0 votes
0 answers
845 views

Tracking down an error from SPFX web part that started yesterday

I have a Spfx web part used on a page in Sharepoint Online that's been in use for over a year. It hasn't changed in at least two months. It uses chart.js to display some data from an api call. ...
0 votes
1 answer
1k 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
0 answers
79 views

Add adaptive card as webpart not as Dashboard

I have build the ACE and deployed to App catalog but unfortunately I cannot add as web part. I am using default or sample code to test (No changes from pre-build) whether this can used as webpart or ...
0 votes
0 answers
29 views

How to get recent opened and shared document in spfx

I am trying below code but getting error https://xxxxxxx.sharepoint.com/sites/xxxxxxx/15/v1.0/me/drive/sharedWithMe 404 (Not Found) private _getFilesSharedWithMe(): Promise<any> { ...
2 votes
1 answer
2k views

how to use react-bootstrap in SPFx webpart

installing react-bootstrap straightforward; "npm install react-bootstrap --save" and "npm install @types/react-bootstrap --save" then add references import FooButton from 'react-bootstrap/...
0 votes
1 answer
2k 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
1 answer
1k views

Unable to run my webpart using gulp serve

I'm trying to work on a project of a SPFx web part. The project was built normally but when I try to test my web part on my tenant the following error occurs: "Your web part will not appear in ...
0 votes
0 answers
23 views

SPFX to check list contains field name

I have used the code from https://github.com/pnp/sp-dev-fx-webparts/tree/main/samples/react-list-form. Based on the code above, I need add additional condition. The code below I can get listId, and ...
1 vote
1 answer
13 views

Dependency issue using viva connections extension in VS code

I have installed the Viva connections extension in VS code. When I create a new project I get this error: [2023-04-26T19:04:44.654Z] [INFO] Running command: yo @microsoft/sharepoint --solution-name &...
1 vote
2 answers
1k 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 ...
0 votes
1 answer
32 views

How can I configure a SPFx webpart project to launch in a specific browser during development?

I want to use the Brave browser with a specific user profile to work on multiple SharePoint sites. Currently, when I run the gulp serve command, the webpart project launches in the OS default browser, ...
0 votes
0 answers
14 views

Sharepoint isn't automatically creating my path to CDN

I've created an SPFx Webpart and uploaded it to my app catalog, however it just says , and once I add my webpart to a page it throws the errors in the screenshot I'm attaching, because it's unable to ...
0 votes
1 answer
3k views

document.referrer sometimes returns blank value

Page A contains a DetailsList, which has links to different pages. Page B contains a file viewer web part. Clicking on any of the links on "Page A" DetailsList row items, directs the user to ...
0 votes
0 answers
159 views

How to use ssh2-sftp-client module in SPFx webpart

I'm trying to use the ssh2-sftp-client module in webpart ,but while executing gulp serve.getting the following error Error - [webpack] 'dist': ./node_modules/ssh2-sftp-client/src/index.js 216:33 ...
0 votes
1 answer
505 views

Why don't the SPFx web parts below the first one load on a page?

Is there a way to make sure all the content, or at least the first few web parts on a page load right away? I have a SharePoint Online classic view page that has four different custom SPFX web parts. ...
0 votes
1 answer
63 views

LivePersona control doesn't work

I did everything according to the pnp documentation (https://pnp.github.io/sp-dev-fx-controls-react/controls/LivePersona/#livepersona-control), but the LivePersona control does not work for me. Photo ...
1 vote
0 answers
22 views

Data mismatch while making a list call to get data from SP list

I'm trying to get Data from SP List through rest API from SPFX, I've checked by running that rest API directly in the browser where it shows correct data but while making a call from SPFX that rest ...
0 votes
0 answers
30 views

Deploying a Teams tab (personal app) using SPFx without full tenant admin privileges

I'm trying to deploy some Teams tab samples (teams-tab-spfx-client) so I could add webparts my team made as a personal app or group tabs. I was able to run this sample on the site's workbench and ...

1
2 3 4 5
25