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
2
votes
2answers
1k views

Add files to subfolders using rest api in javascript

What is working right now is i can upload to the root folder of a library using the code below : myDropzone.options.url = `${_context.pageContext.web.absoluteUrl}/_api/web/Lists/getById('${_parent....
0
votes
0answers
73 views

Bind Detailed List on selection of Dropdown SPFX

I had created a SPFX webpart which bind data in Detailed list and one more component is there which is dropdown . I am unable to bind Detailed List on change of Dropdown , below is my full code , now ...
0
votes
0answers
19 views

getting document from Sharepoint Document library

Can anyone guide me to how to get document from Sharepoint Library using rest api in Spfx ,tried using below code to bind static data in Detailed List ,but unable to get rest api call ? ...
0
votes
0answers
79 views

SPFX : using the OOB filter on a modern Document Library webpart using dynamic data from a custom webpart on the same page (SharePoint online)

Sharepoint Online/SPFx wizards-> do you think this is even possible? More specifically, in the property pane of the document library webpart (moder/SharePoint Online) it has the option to toggle ...
0
votes
0answers
16 views

@microsoft/file-browser production release and support

We have started building a custom Azure DevOps Services Extension, for our Organizations, that is using the @microsoft/file-browser API to make MS Teams/SharePoint Libraries available in the ADO Work ...
0
votes
0answers
41 views

Export PnP reusable controls from SPFx library component

I am trying to export pnp reusable controls from SPFx library component by following this article: https://www.m365-dev.com/2020/04/23/export-pnp-reusable-controls-from-spfx-library-component/ But ...
1
vote
2answers
2k views

Workbench issues with spfx 18.2 and react 16.8.4

I have recently updated a number of modern spfx webparts to spfx 18.2 and this morning when I try to debug in workbench (locally and on tenant) I am getting serve errors in relation to react and react-...
1
vote
4answers
196 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 ...
0
votes
0answers
21 views

Is it possible to get calendar events from my Outlook in SharePoint workbench after gulp serve using Microsoft Graph API?

I am using Microsoft Graph API to query Outlook Calendar events and display in SharePoint site. I followed this article: https://www.c-sharpcorner.com/article/retrieve-calendar-events-using-microsoft-...
0
votes
1answer
41 views

Rest api to get all Documents from all subsites

I have 5 subsites (Sub1,Sub2,Sub3,Sub4,Sub5) and all subsites is having Document library name (PublishedDocuments) Sub1 - PublishedDocuments Sub2 - PublishedDocuments Sub3 - PublishedDocuments Sub4 - ...
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 ...
0
votes
1answer
21 views

Not able to fetch data from particular list item of site content using React APP WEB-part

I am able to fetch the list which we see on the landing screen of the site-content. However, when I am trying to fetch data by finding a particular item by its title I get an error CANNOT FIND LIST '...
0
votes
1answer
138 views

How to change dropdownItem color in office-ui-fabric-react?

I am new to SPFX and office-ui-fabric-react. I have a dropdownlist with below code and attributes: <Stack tokens={stackTokens}> <Dropdown placeholder="Select an option" label=&...
1
vote
1answer
119 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
1answer
156 views

Getting warning messages : Warning - [sass] The local CSS class 'min-chart' is not camelCase and will not be type-safe

I am using third party css in SPFx. When I am building it, SPFx is showing me lots of warning messages : I am using Windows 10 / SPFx 1.11.0. Please let me know how to disable these warning messages. ...
1
vote
1answer
55 views

Hide table column from property pane (WebPart)

I am still new into the WebPart development so bare with me: I have created a WebPart consisting of table and I have several toggles in the settings that can show hide a column in the table. Somehow I ...
0
votes
1answer
18 views

Reading configuration at runtime

I have created "Search Result Source" in my development & production environment Using that in search REST API with source GUID. Now thing is that source GUID of development & ...
2
votes
2answers
3k views

How to edit a Rich Text Field in an SPFX Webpart

I am creating an spfx webpart to allow users to edit some items in a list. I am trying to use office-ui-fabric-react for all the controls as recommended. The list has a rich text field(Enhanced rich ...
0
votes
1answer
33 views

Updating Client Side Web App in Sharepoint Online App Library - Not Updating

I have an app deployed on Sharepoint with 3 Client Side Web Parts. When i first add it, it's version is = 1.0.0.0. When I make changes to the solution: Change version to 2.0.0.0 gulp bundle --ship ...
0
votes
1answer
89 views

Rating in SPFx webpart

is there any way to show rating in spfx web part from list as star
0
votes
1answer
137 views

Multiline text field JSON to array - SharePoint SPFx

I'm building a webpart application using SharePoint SPFx with react. I would like to use SharePoint's multiline text field as a way to store an array. I saw this thread here which said you can convert ...
0
votes
0answers
42 views

pnp/sp-dev-fx-webparts Modern Script Editor Webpart page reloading issue

I'm using the Modern Script Editor Webpart from pnp/sp-dev-fx-webparts GitHub. Installation and deployment all went fine and I can also execute JavaScript code on my sample modern teamsite. Here's an ...
2
votes
4answers
4k views

Cannot test SPFX webparts on my SharePoint tenancy

I am using the SPFX and I have created my webpart using SPFX and gulp serve is running on my development machine but when I try and test the web part on my tenancy I get this error message : Your ...
0
votes
1answer
42 views

SPO permissions for web-part page that uses restricted lists and libraries

I have created a web-part page containing a web-part that reads, updates and deletes items from lists and libraries. I have created a group and linked it to a custom permission level that has the ...
0
votes
0answers
27 views

PnP Modern Search Issue

I have downloaded the latest package (.sspkg) for PnP Modern Search and uploaded it on to SharePoint online. I have configured it and it works well on my end. Another user is getting this issue: [...
0
votes
0answers
26 views

How to use PnP caching when fetching folders or files Sharepoint picture library?

Caching is working for other calls like for getting items from lists. But I am facing problem when I am trying to use caching when fetching folders and files from sharepoint picture library. PnP call ...
1
vote
2answers
113 views

SPFx - Update a calculated column formula

I am trying to use this.context.spHttpClient.post() to update a calculated column formula in my SPFx WebPart. I get a status code of 400 with the error message: "The parameter __metadata does not ...
0
votes
2answers
153 views

SPFx: Rendering Mock List Data

I'm trying to follow the Microsoft docs here, but it seems outdated. They are using these two lines to render to the page: const listContainer: Element = this.domElement.querySelector('#...
0
votes
3answers
458 views

NPM packages for React webpart SharePoint Online try to access 'fs' on client side but it's not even necessary? React SPFX

While there is a correct answer already given at: SPFx Unable to use 'fs' module its missing the part that in webpack config it can be outflagged like this: node: { fs: 'empty' }, Module ...
0
votes
1answer
56 views

object Object error in SPfx

Trying below code to read Site column but getting value as [object Object] OnClick Function: onClick={()=>{this.Funnel(items.SiteColumn)}} Complete function code: public render(): ...
0
votes
1answer
109 views

Filter on Multiple values for same column using Rest api

Is it possible to filter using SharePoint REST api in sharepoint to Filter on Multiple values for same column?
0
votes
0answers
23 views

Upload function fails in custom web part on Modern Site

Category Test, Build and deployment succeed but Upload function fails on Production server Describe the bug I have re-installed all required SPFx packages on my Windows system before recreating the ...
0
votes
0answers
35 views

How to deploy from powershell script using github actions?

I am trying to deploy to siteCollection appcatalog on each push to my github repository using github actions. Saw that it's possible using Office 365 CLI action, but that only allows tenant admins to ...
0
votes
1answer
78 views

Regarding Microsoft spfx documentation

I try to create a spfx webpart by following Microsoft document: https://docs.microsoft.com/en-us/sharepoint/dev/spfx/web-parts/guidance/simplify-adding-web-parts-with-preconfigured-entries Original ...
2
votes
1answer
1k 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 ...
1
vote
1answer
221 views

What is the use of WebPartContext in SPFx?

I am writing an SPFx, I have used React, PnP JS. I created a service class, which will be responsible to communicate with SharePoint. Below is the snippet of the code: export class service implements ...
0
votes
1answer
90 views

Calling render before all js files are loaded so the owl carousel is not working

I am loading all JS files using SPComponentLoader in ts file and I am using await for each load call. Even then when I debug my code I observed it goes to render() in .tsx in between, executes that ...
0
votes
0answers
38 views

Loading a webpart inside of another webpart dynamically

I have a specific requirement to implement dynamic web-part loading. What I am trying to achieve is to have a web-part basically load inside of another. Not sure if this is possible or where to start. ...
0
votes
1answer
47 views

cross site collection file property update in SPFx

is there a way to update SharePoint Library file properties from different site collection? I have file uploaded to https://sharepoint.com/sites/site1 & I need to update the file property from ...
0
votes
1answer
233 views

Upload file from one site collection to another in SPFx

I have a SPFx solution which have a input tag to upload a file. When I try to upload the file in the same context of the site collection it works fine, but I am not able to get uploaded to different ...
0
votes
0answers
65 views

SPFx: Recommended Method for Retrieving Audiences Assigned to a User

I apologize in advance if this is common knowledge as I have not had any luck in finding an answer through various searches that I've done thus far. My dev environment does not have any audiences set ...
3
votes
2answers
161 views

Is it normal that SPFx Webpart folders are huge

I've started experimenting with SPFx and going through the tutorials. One thing I realized is that the web part folders are enormous in size. Is this normal? The basic HelloWorld folder created by ...
0
votes
2answers
48 views

External sharing is disabled for https://yourtenant-admin.sharepoint.com/_layouts/15/workbench.aspx

I am trying to create a new web-part using the SharePoint Framework. After doing gulp serve, If I go to the page https://your-sharepoint-tenant.sharepoint.com/_layouts/workbench.aspx, I am seeing an ...
0
votes
1answer
178 views

PnP REST API call to get Image URL (FileRef) Property

Started working on SPFx and would like to develop an Image Rotator. As a first step, I wanted to get all the images and respective properties using PnP JS and used the following call and got the ...
1
vote
0answers
243 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 ...
0
votes
1answer
96 views

Is it possible to modify RichText control from @pnp/spfx-controls-react to include Table support using React?

I have been working on creating a webpart for use in SharePoint Online where it uses the RichText control from here. So far its been working well and allowing for most formatting options, but its ...
2
votes
1answer
372 views

Use CKEditor in SharePoint spfx solution with React

We are trying to set up and use CKEditor5 with React in a SharePoint spfx solution (of course also React), but we are struggling with making it work as we would like. The Classic build of CKEditor5 ...
0
votes
1answer
145 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
0answers
21 views

SharePoint Framework and Promises

Can someone please help me understand some code. I am just starting to learn about SPFx and the following piece of code that I wrote is causing issues private _retrieveListItems(): Promise<...
1
vote
1answer
65 views

MS Graph returning undefined response

I am trying to get an image of a user with the help of MS Graph. However, a response is always undefined and there is no error given but If I run a query on MS Graph Explorer I get the full image of ...

1 2 3
4
5
19