Questions tagged [spfx-webparts]

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

359 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
1
vote
1answer
54 views

Update List in List view webpart based on url parameter

Is there any way to dynamically update the list in the 'list view web part' based on the url parameter? My requirement is- I have a sharepoint modern/classic web page, in that I have to display list ...
1
vote
0answers
30 views

How to set active item index in pnp/spfx carousel?

I am using Pnp/spfx Carousel control and binding elements like below: <Carousel buttonsLocation={CarouselButtonsLocation.center} buttonsDisplay={...
1
vote
0answers
17 views

Textbox start typing backwards when you move curser out of Microsoft Teams Tab

We have SharePoint framework app embedded into a SharePoint page and added to Teams as a tab. textbox (basic HTML) start typing backwards when you move your curser outside the tab area (either to ...
1
vote
0answers
152 views

How to create multiple columns in a SP list using single REST call

I want to create 3 columns in a SP list from my SPFX webpart using REST call. Could you please let me know how to achieve this? I am using below code to create 1 column but instead I want create 3 ...
1
vote
0answers
45 views

SPFX Uncaught TypeError: state.Array.slice is not a function

Code where the error occurs: const initialState: IUserProfileState = { useremail: '', status: '', //items: {} as IListItem[], EmpID: '', ExeArray : {} as IArrayItem[]...
1
vote
2answers
263 views

SPFx web part with SharePoint 2019 not supported by latest react versions

I have created a carousel using SPFx web part with react. My react version is 15.6.2 and solution selected is SharePoint 2019 onwards, including SharePoint online. I need to display Thumbnail images ...
1
vote
0answers
19 views

What's the pros/cons of updating vs not updating version number on SPFx webparts or customizations?

In SPFx development, what is the benefits or disadvantages of updating or not updating the version number when updating in the app catalogue? The best practice appears to be to update it to something ...
1
vote
0answers
32 views

How does updating SPFx webparts/extensions work between tenant wide/non-tenant wide deployment models?

I am trying to understand the difference between deploying spfx customizations between tenant wide and non tenant wide (and differences when updating/not updating the version number). Per my current ...
1
vote
3answers
85 views

Expanding People and Groups Column using React SPFx

Being new to SPFx , I've not able to retrieve values from people and group Attendee column Below are the steps I followed Defined Attendee in the below interface export interface IListItem{ ...
1
vote
1answer
15 views

Error “This tab is not supported on your mobile” on adding webpart to Microsoft Teams when login through mobile

I have synced the spfx webpart with Microsoft Teams, it is working fine on the system but when trying to open the tab through mobile it is giving me an error "This tab is not supported on your ...
1
vote
1answer
33 views

Error creating SPFx with React JS

Getting below error while trying to create an SPFx project with ReactJS, but if I use NO JS Framework it works fine. I have updated the npm to version 6.14.7, updated the @microsoft/SharePoint ...
1
vote
1answer
326 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 ...
1
vote
1answer
32 views

SPFx node version keeps updating

I've built several SPFx web parts but now I'm getting errors because I'm "somehow" on node v12 which I don't believe works with SPFX. I certainly didn't update it so how has it switched to ...
1
vote
0answers
20 views

Can I display a webpart as output of another webpart?

Can I output a webpart as part of another webpart rather than duplicating the HTML? For example, if I have a 'Person' webpart that outputs a contact card, can I have a 'People' webpart that outputs a ...
1
vote
1answer
174 views

I want to use sharepoint site asset folder for hosting client side files, where should I define this path in my spfx web part files?

I'm trying to host the JS files (webpart\temp\deploy) of my web-part in the asset library folder, but I'm not able to reference that in the config files. In which file I have to defined that path? the ...
1
vote
4answers
266 views

Is it possible to change the owner of a group using Rest API?

I am creating Sp groups and the Owner gets set to whoever runs the script. I am trying to set the owner to another group or user and it is not working. The SP.Group documentation says it should work ...
1
vote
0answers
292 views

Sticky Header in SPFx webpart

I have a SPFx webpart where I am using "DetailsList" to bind search data, I want to make header sticky while person scrolls the webpart, I have a search bar then dropdown and then grid in ...
1
vote
0answers
42 views

SharePoint 2019 SPFx, react-router-dom and its types

I am using SharePoint 2019 on premise. When I latest react-router-dom and its type I get error for type. Below is my dependencies and my "typescript": "~2.4.1" So somebody help me which version ...
1
vote
1answer
412 views

In a SPFx web part, how can I get description and Url from a SP.FieldUrlValue?

I have a SharePoint list with a Link column of type Hyperlink or Picture. How do I access the description and url values in code? export interface ISPList { Title: string; Link: object; } ...
1
vote
1answer
87 views

Add spfx webpart to a page in subsite sp online

I have created a spfx webpart and deployed it in site collection app catalog. But when I try to add it in modern page in subsite, webpart is not displayed for adding it to page. What is that I m ...
1
vote
1answer
402 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
1answer
142 views

Update person field (multiple selection) using JavaScript without PnP

I am trying to create an SPFx web part using SharePoint 2016. When adding PnP to SharePoint 2016, it's giving me errors and not working like when I add it to a SharePoint online SPFx web part. How can ...
1
vote
1answer
29 views

Custom Web Part Uploading Incorrectly

I am trying to upload my custom web part to my sharepoint online site. The upload is successful, but when adding the web part to a site it is not the expected content of the web part. It seems to be ...
1
vote
1answer
93 views

Search API exclude null Birthday records in SharePoint Online

I am building a birthday webpart. I am using search api to get the user details as below: var birthday = 'RefinableDate00'; fetch(this.props.SPUrl + "/_api/search/query?querytext=%27*%27&...
1
vote
1answer
169 views

Adding same spfx webpart(no javascript framework) with different configuration, multiple times on the same page replaces the previous webpart output

I have created a spfx webpart (no javacript framework), it shows member name from active directory.it is working fine if i use once, if i add more than once it replaces the previous output. here is my ...
1
vote
1answer
643 views

ReactDom render multiple elements spfx

Let me start by saying I am working on my first webpart and learning react spfx. I am trying to render multiple elements using ReactDom.render. How do I render both the elements on the same .ts file? ...
1
vote
0answers
22 views

Why does a Teams Tab based on a SharePoint Framework-WebPart open a Webbrowser?

A SharePoint Framework-WebPart, that is added to a Microsoft Teams-Team as a Tab, works fine for most users- but for a few users a Webbrowser opens when they try to open that Tab in their mobile Teams,...
1
vote
1answer
526 views

Handle failure response on SharePoint list item add using PnP JS

I have created one SPFx web part with React framework to add the items from .CSV file to SharePoint list using PnP JS. I have used PnP JS item.add() method to add the item in the list by looping each ...
1
vote
0answers
23 views

SharePoint 2016 SSO with Custom Web API

I am trying to Build SSO between SharePoint 2016 On Premise site and Custom Web API which is hosted in On Premise IIS. I tired to build a Provider Hosted Add In to achieve this. But It seems not ...
1
vote
0answers
56 views

how get client via aadhttpclientfactory?

I have a webpart that should be authorized via aad to have access to an API that is embedded outside (api is not on azure), this api is registered in aad as an application, but at the moment I do not ...
1
vote
0answers
138 views

How do you delete tasks from Project Server via REST?

TL;DR - it appears to be impossible to delete tasks from Project Server using the REST API. Please, someone suggest something to me, because this is excruciatingly frustrating. I'm trying to delete ...
1
vote
0answers
117 views

SPFX : TypeError: external__react_.useContext is not a function

I am using office-ui-fabric card in my spfx web part. Getting the error as below. createComponent.tsx:51 Uncaught TypeError: external__react_.useContext is not a function at result (...
1
vote
0answers
476 views

How to jump specific page using pnp js for sharepoint pagination

I am using pnp js Get Paged Items for pagination in my SPFx webpart. sp.web.lists.getByTitle("MyCustomList").items.top(10).getPaged(); Suppose I have 150 data in a list. I set 10 data for a page. So ...
1
vote
0answers
377 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 this:...
1
vote
0answers
39 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 ...
1
vote
0answers
20 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 ...
1
vote
0answers
75 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 ...
1
vote
1answer
627 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
311 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 "...
1
vote
2answers
140 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 ...
1
vote
0answers
182 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
633 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
775 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 ...
1
vote
0answers
668 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: ...
1
vote
0answers
66 views

Get ADFS claims using JavaScript

Anyone using ADFS with 2016. We would like to get users claims in a SPFX webpart or with JavaScript. Can't find anything on the topic
1
vote
0answers
1k 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="...
1
vote
1answer
676 views

SPFX Webpart- “Error initializing application” after refreshing page

SPFX app is created and deployed tenant level. IF it is add to a page at site collection level (ex:https://text.sharepoint.com/sites/ABC) it is working perfectly. If it is added at subsite level (ex:...
1
vote
2answers
316 views

Error after installing the SPFx environment for the first time

Got a following error after installing the SPFx environment for the first time any help would be helpful. Thanks in Advance.
1
vote
0answers
80 views

“Likescount” and “CommentCount” returns null from publishing pages

I have a search function that connects to "LikesCount" and "CommentCount"properties (social bar). Example: let localQuery = SearchQueryBuilder.create('', {TrimDuplicates: false}) ...
1
vote
1answer
606 views

Steps to setup SP2016 onprem with React using SPFX

I am trying to setup SP2016 onprem with React, using Yoeman generator @microsoft/sharepoint. I am getting errors when I run gulp serve. Need Help on setting up this project using SPFX. I have ...

1
2
3 4 5
8