Questions tagged [spfx-webparts]
Technical questions about building and using web parts based on the SharePoint Framework client-side development model.
965
questions
0
votes
0answers
20 views
Custom web part which downloads a file from SharePoint document library
This is a simple question. I need to make a custom web part which can download a file from a SharePoint document library. I created a web part which contains a download button. The button should ...
0
votes
2answers
23 views
Graph Api call with filter query
How can I filter the API call dynamically passing through variable?
I am getting value in this variable through another API call:
var userid;
this.props.context.msGraphClientFactory.getClient().then(...
0
votes
1answer
21 views
Get selected value of fabric dropdown
I want to get value of selected dropdown in my Visacontact() function, below is my code:
<Fabric className={styles.matrix2}>
<VirtualizedComboBox
styles={comboBoxStyles}
...
0
votes
1answer
22 views
How to change web description in SPFx React webpart?
I'm writing an SPFx web part using React. I can get the description of the current web like this:
let desc = this.props.context.pageContext.web.description;
But how can I change the web description? ...
0
votes
2answers
19 views
Passing variables in Query string in tsx file (react +typescript)
I am trying to pass plainid and id as a parameter in query string in URL.
{planid = item.planId}
{ id =item.id}
<td><a href="https://tasks.office.com/credentinfotech.com/en-GB/...
0
votes
0answers
35 views
is it possible to use crawled or managed Properties in pnp/sp-dev-fx Modern Script Editor Webpart?
I created a html/js gantt chart and would like to use a sharepoint list to update it. is it possible to use crawled or managed Properties in the Modern Script Editor Webpart like you can with the ...
0
votes
1answer
30 views
SharePoint SPFx webpart not showing latest build
I'm building a SharePoint SPFx react webpart.
I'm developing on a local level using workbench with a link similar to this:
https://mysite.sharepoint.com/sites/sitehere/_layouts/15/workbench.aspx#/
...
0
votes
2answers
28 views
How to check logged in user has access to a another SharePoint site or not using REST Api?
I am developing a web part, where I need to check logged in user does have access to few SharePoint sites(SiteA, SiteB, SiteC) or not. I am following currently below approach. I am passing each site ...
0
votes
2answers
22 views
how to fetch all Planner Task in SPFX through Graph API
On the basis of outlook task example give here, I am trying to fetch all task/plan in planner associated with a user.
I am not sure if it is the right approach / set of code to fetching it.
While ...
0
votes
1answer
30 views
App catalog - Site collection vs root site collection scope question
I have a SPFx web part which I downloaded from Images and Videos in a Carousel.
I don't have access to the root site collection app catalog so I added it to a site collection catalog I newly created. ...
0
votes
2answers
25 views
SharePoint SPFX Webpart, Create a callable function that gets user information from the Graph API
My organization is currently using the https://github.com/pnp/sp-dev-fx-webparts (React-Script-Editor) webpart on several of our SharePoint online site collections to enable the functionality we had ...
0
votes
0answers
26 views
PnP FieldUserRenderer control and value prop
I developed a web part where I am using FieldUserRenderer control and the field does not completely work how it should be based on documentation.
In my case, when I hover the mouse pointer on the ...
1
vote
2answers
34 views
Are there any good SPfx tutorials, guides and examples?
Since SharePoint 2019 doesn't come with certain features out of the box, eg. Column headers that stay in place while scrolling, I am in the process of learning SharePoint framework.
Are there any good ...
0
votes
2answers
45 views
Expand All and Collapse All functionality on Button Click
I am using the PnP SPFx Accordion control in my SPFx solution I want make all Accordion Expanded and Collapsible on button Click.
Below is my one accordion I am changing the state on button click but ...
0
votes
0answers
47 views
SharePoint multiline view-column formatting to create chat
I'm building a SharePoint project using SPFx and PnPJS.
In my SharePoint list I created a multiline field. And in the column formatting section I added this snippet here:
https://raw.githubusercontent....
0
votes
1answer
41 views
SPFX File upload to List
This issue is related to a No Javascript Framework SPFx webpart with RestAPI on Sharepoint 2019. The webpart contains a 'text' and 'file upload' fields. The aim is to fill in the text field, select a ...
0
votes
1answer
46 views
SPFx - How to create a custom WebPart Property for a selectable link
I am very new to creating web parts and property panels in spfx. I have gone through hello world, all the MS documentation, but the thing that is missing is the ability to link/upload to a file/folder ...
0
votes
1answer
31 views
SPFX radio button click to update label value
I have SPFX no framework web part in SharePoint 2019. I am having trouble automatically calling a function when the radio/checkbox button is clicked within the form.
Here is a radio button within the ...
1
vote
0answers
35 views
Add SPFx to Angular Page
My organization has a site completely designed in angularJS(Not designed by me). Now I have designed a web part using SPFx which I want to add to the existing site. The web part layout is also ...
0
votes
1answer
26 views
Need guidance to create React SPFx webpart with nested dynamic content
I am working on a scenario where we have a top level SP online site 'Top1' and it has subsites for each department say dept1,dept2,dept3.Each department has specific request list and and respective ...
0
votes
2answers
61 views
Newly created SPFx web part using react framework gives error with SharePoint online workbench while testing
I have just created one SPFx web part with react framework. I tried testing through SharePoint online workbench (https://demo.sharepoint.com/sites/test/_layouts/15/workbench.aspx).
I am getting an ...
0
votes
2answers
39 views
Exception in String type error on SPFX with JQuery
I really need help to resolve Type error encountered on this function in SPFX with jQuery.
Here is the function, The return statement is failing:
var addFile = function (fileTitle, fileName, fileType, ...
0
votes
0answers
15 views
Iterate nested array of objects and append children to a particular object using jQuery/React
Iterate nested array of JSON objects and append children to a particular object using jQuery/React
We are trying to create a tree view navigation using PnP react TreeView control for SharePoint ...
0
votes
3answers
64 views
While setting up new SPFX environment getting Error of unsupportability
I am trying to set up an environment for SPFX development. I tried to install the latest version of nodejs.
I installed latest version of nodejs 14.15.4 and automatically npm verion 6.14.11 installed.
...
2
votes
2answers
41 views
Not able to insert data into TaskList In sharepoint Spfx
Using SP-Pnp-Js Library, I am not able to insert data from a webpart into the sharepoint Tasklist.
private SubmitWorkflowForm(): void {
var TaskNameVal = document.getElementById('taskName')['value'];
...
1
vote
1answer
50 views
SPFX No Javascript Framework
I am encountering the below error and would welcome any information to resolve the issue:
SharePoint 2019
SPFx webpart with No Javascript Framework
PropertyPaneFieldType'.\n Property 'DynamicField' ...
0
votes
2answers
77 views
Promise is missing properties
When I try to create array, to put the results in the array, then I get the following error message:
const allItems : any [] = sp.web.lists.getByTitle("Documents").items.get();
Type '...
0
votes
0answers
15 views
Intercepting Query String Changes in Web Parts -Error when traversing between items in Left nav (SPFx Webparts)
I am working in Sharepoint online 2019 with SPFx Webaparts. We had a requirement to change query string (added filter)
in application spfx webpart with kendo grid. It got changed in URL but the grid ...
0
votes
0answers
50 views
SPFx Play HTML5 Video dynamically on a webpart
We are developing a webpart
That has a textbox where we supply a Video URL
This would fetch the Video URL from a SharePoint list on button click and set the SRC of the Video Element.
Code
function ...
0
votes
0answers
37 views
Getting Manifest not found for component id errors when adding a custom SPFx webpart to a site
For my SP Online instance, I made a SPFx webpart and when I deploy it to a site, I get the following. I did a non-tenant wide install to the tenant app catalogue. And then I installed the app on my ...
3
votes
3answers
148 views
Share “node_modules” folder between webparts
Here is my scenario:
I have 7 different webparts
In order to have more control over the projects, I have split them in different projects
All of the projects were created using the Yeoman installer
...
2
votes
1answer
57 views
SPFX Webpart width shrinked after published in Modern Page - SharePoint Online
Developing SPFX app, where everything looks good(I mean the width) in edit mode, soon after publish the webpart width is getting reduced somehow.
Using Fabric UI CSS
.propertyDigitalManagementWebpart ...
0
votes
0answers
17 views
How to prioritise loading of one web part in SPFx?
I have a SharePoint modern page on which I have a couple of web parts installed. The web part on top is a carousel that needs to be rendered first. The problem I am facing is that when the page is ...
0
votes
2answers
25 views
Can GraphAPI be used to create item to list using SPFx, even if Current Loged-In user have have only Read Permission on list?
With SPFx can item be created in a list using GraphAPI if User have only "Read" permission on list? Will granting delegate Permission to SPFx solution with Sites.ReadWrite,Site.All will work?...
1
vote
1answer
95 views
Filter based on date only, not time | PnP JS
I am using PnPjs to query a SharePoint list. I am using this code:
let today: string = (new Date()).toISOString();
today = `${today.substring(0, today.indexOf('T'))}T00:00:00Z`
let results = await sp....
2
votes
1answer
63 views
onDisplayModeChanged not called when client side page changes display mode
I have a web part that use onDisplayModeChanged to handle different content based on edit mode end view mode - and they have worked fine for months - until some days ago.
MS doc: https://docs....
0
votes
1answer
73 views
how to use Fluent UI HoverCard in SPFX Webpart
In my current project there's requirement to show more details when hovering on a read more HTML span, where specified functionality is to show Fluent UI HoverCard with all the details, I am trying to ...
0
votes
0answers
19 views
Microsoft Teams Tab is not able to fetch SharePoint List Data
Is there any way, so that my "Teams Tab" could fetch the value from SharePoint list's data?
I have used SP PnP JS library in SharePoint SPFx to build this solution.
I have Sync this ...
0
votes
1answer
62 views
How to enable promoted results in modern pnp search app search result
How to enable promoted results in modern pnp search app search results?
MS Search showing the promoted results are first.
1
vote
0answers
20 views
Initialising spfxContext for a different user in pnp/sp
I'm trying to build an spFx app, that uses a different user to access lists and libraries than the logged in user. The logged in user won't have the permissions to access the lists directly but only ...
0
votes
2answers
109 views
Fluent UI no theme in SpFx
I'm currently working on my first SPFx project using Microsoft's Fluent UI React. I tested my solution in the local workbench and everything seemed fine. But as soon as I release it to the app catalog ...
0
votes
1answer
50 views
SharePoint Online and adding an interactive page (Javascript)
I havenāt developed in SharePoint for a while and trying to gain some knowledge on how to create a interactive SharePoint Online page - either classic or modern.
The requirement is to display/edit a ...
0
votes
1answer
27 views
VideoPlayer using React and Typescript
Being new to typescript , I have been struggling with its implementation lately using it on the webpart.tsx file
With the help of the posts here , was able to get to the point where the video plays ...
0
votes
2answers
352 views
How to use the latest set of Fluent UI icons for SPFx?
I am using the code from here
https://developer.microsoft.com/en-us/fluentui#/controls/web/icon
which is
import { FontIcon } from 'office-ui-fabric-react/lib/Icon';
<FontIcon iconName="...
0
votes
0answers
11 views
Component Inheritance from Property Pane
I want to know if it is possible for other react components created within the spfx project to inherit property pane properties from the root class and if yes how does one go about it???
1
vote
1answer
216 views
open another teaching bubble on click of heading in Teaching bubble
First Teaching bubble as per your example
import * as React from 'react';
import { MouseEvent } from 'react';
import { DefaultButton, IButtonProps } from 'office-ui-fabric-...
0
votes
1answer
126 views
Creating items or updating items inside folder in sharepoint list in SPFX typescript using PNP or spghttp client
I was trying to creating an SPFX solution using React where on submit of form I am saving multiple items inside a folder in SharePoint list.
I understood how to create folder inside SharePoint list ...
0
votes
1answer
17 views
Hide SharePoint sppkg from site contents
How do we hide all the solutions deployed in a site from site contents? I am structuring my solution to have separate project for each web part. So far I have 7 web parts each deployed with a ...
1
vote
1answer
39 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 ...
0
votes
1answer
59 views
SPFX Package Error in SharePoint
We are getting the below error while trying to deploy SPFX webpart in SharePoint. We are using SharePoint 2019 On-premise.
When generating the package it does not generate any errors but when I upload ...