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
1answer
10 views

Is there a type of custom web part I can make that is available to all sites without having to first add the app to the site?

I'd like to create a web part that shows the time in specific time zones and some other organization specific info so that any site in our farm can add the web part to any page. Using SPFX and ...
1
vote
1answer
12 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 ...
0
votes
1answer
14 views

Dynamically populate dropdown inside spfx webpart

I am new to spfx webpart. I have following clarification. Is it possible to populate choice column values of a library to drop down control dynamically. Note: I don't want to display dropdown as ...
2
votes
1answer
29 views
+200

How to set enterprise custom field values on a particular (new) task using Project Server JSOM?

I'm creating an SPFx web part that reads tasks from one project file stored in Project Server, gets some values from those tasks (including the values of some local custom fields), and then creates ...
0
votes
0answers
17 views

How to sync a SharePoint Web Part with Teams?

I have developed a SharePoint WebPart, this component has several properties that I can modify from SharePoint: width, height... I have installed the same component in Teams and works fine but I ...
0
votes
1answer
13 views

React.js: avoid delay on element <input type=“file”> onChange event

Any react-specific solution to the problem, described here? https://stackoverflow.com/questions/46072489/how-to-avoid-delay-on-element-input-type-file-onchange-event?noredirect=1&lq=1 Basically ...
5
votes
1answer
798 views

SPFx web part not showing from the catalog

Followed the video from SharePoint Framework development with SharePoint 2016 Feature Pack 2 but could not add the web part to the site because it did not show up. I made sure I have only SPFx 1.0....
2
votes
2answers
5k views

use jquery functions within spfx webpart

I need to use jquery in my webpart function, remote jquery lib added from cdn; SPComponentLoader.loadCss('https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js'); and this is my simple ...
20
votes
4answers
5k views

SPFx: loading jQuery (and other libraries)

The SharePoint Framework weather example loads jQuery inside the WebPart render method: https://www.youtube.com/watch?v=HGC9gsDRy1E#t=10m30 Questions: Is this the preferred development pattern? ...
1
vote
1answer
14 views

Display multiple Dynamic IPropertyPanePage.groups Sharepoint Online Framework

Hi everyone I'm creating a Web Part in order to display a full width Bootstrap grid with you can personalize Sharepoint pages. Selecting the Grid Size options the Grid is created and everything works ...
0
votes
3answers
3k views

Add OnClick Event to SPFX Html - No Framework

I have an SPFX Web Part (No Framework) and would like to add an onClick event to my which will call my function swap(). Code: export default class ExpandableIFrameWebPart extends ...
0
votes
0answers
25 views

SP fast deploy error “File not found”

I've been getting this error but the bundle file is already present. Can anyone help me out Fast deploying to SP App C:\Users\xanderCage\Desktop\xanderCage.Apps.SharePoint-Dev1.0_react\OnboardingApp\...
1
vote
1answer
31 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="";...
0
votes
0answers
17 views

Uncaught Error: Mismatched anonymous define() module: function(z) AT share point MasterPage

I am getting a console error Uncaught Error: Mismatched anonymous define() module: function(z) Am using SharePoint custom master page.when i load my page with Seattle or Oslo master page there is nor ...
0
votes
0answers
20 views

Sharepoint Online Unable to Deploy Webpart on Tenant

I know this might be duplicated but I could not find the solution. //package-solution.json { "$schema": "https://developer.microsoft.com/json-schemas/spfx-build/package-solution.schema.json", "...
1
vote
1answer
28 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 ...
0
votes
1answer
19 views

Use SharePoint Theme colors in SASS exported variables

I want to apply the color palette of the selected SharePoint theme to a SPFx webpart by setting a set of variables I export from the SPFx webpart's .scss. I want to define the colors as exported ...
1
vote
3answers
751 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 ...
0
votes
2answers
2k views

Getting Minified React error #31 when trying to view SPFx webpart in Internet Explorer 11

We have SPFx webpart on version 1.8.2 using React version 16.7.0. When we test the webpart on Google Chrome it works perfectly fine. But when we test it on Internet Explorer 11 it shows error in ...
0
votes
0answers
50 views

How to best implement pagination for a spfx web part displaying a list of links?

I have a web part that displays a filtered list of links based on the logged on users profile properties. Its working well, but I cannot work out the best way of adding pagination. The list is never ...
0
votes
0answers
15 views

SPFx getting items from list using Restapi with camlquery facing a thershold problem

I am trying to retrieve the items from list using restapi with camlquery in SPFx solution but i am not able to get the items because of the thershold. How to overcome. The code like below. let ...
0
votes
1answer
110 views

Image Carousel SPFx webpart with video as a source

I want to bind a video in carousel with source which is a hyperlink in the carousel. I am able to bind images but not able to bind video as a source. How do I load videos with images? <div style={...
0
votes
1answer
12 views

How would you unit test a WebPart that extends BaseClientSideWebPart?

I want to unit test that webpart, but I am not sure how to go about it. I have around 30 properties and 50 private variables. How do I mock them? I use PnP to fetch values for the private values, but ...
1
vote
1answer
22 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
2answers
2k 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 ...
2
votes
1answer
40 views

Retrieving data from rich text editor in spfx web part properties

I am currently creating a custom web part, the webpart is using PropertyFieldCollectionData to collect user data (https://sharepoint.github.io/sp-dev-fx-property-controls/controls/...
1
vote
2answers
31 views

Remove the background of my Custom WebPart

Hope you can help me on this inquiry I am trying to removed the white background of my Custom webpart that I have created so that its background will depend on the section background when I check it ...
1
vote
1answer
24 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 ...
0
votes
1answer
32 views

SharePoint App - SPFX Webpart - Access list on site to which user does not have access

I am working in SharePoint Online. I am trying to make a SharePoint SPFX webpart that : Will be added to a modern page in some site collection, let's call it SiteA Will read the contents of a ...
0
votes
0answers
22 views

Can progressive web applications be created using SPFx webparts hosted on SharePoint Online?

I am looking to create progressive web applications (PWA) with data hosted on SharePoint lists. I wanted to know if it is possible to build PWA using SPFx webpart hosted on SharePoint Online? I cannot ...
0
votes
1answer
15 views

SP.MoveCopyUtil unavailable for use (SPO JSOM)

I am trying to use JSOM to programatically move existing files in a document library to a document set within the same library. I think I should be able to use SP.MoveCopyUtil.MoveFile for this ...
0
votes
1answer
22 views

SPFx Loading indicator not working when solution is deployed on SharePoint Online

I'm fair new to SPFx and I was tasked to consolidate some webparts there were previously in different solutions into one spfx solution including all of them, I started with 4 webparts, in all of them ...
2
votes
1answer
841 views

Open modern image file dialog in SPFx web part

By using the "Quick links" client-side web part on a modern site page it is possible to add a new link and set an optional image by a file dialog. Is it possible to use this kind of file dialog in ...
0
votes
0answers
36 views

External script added to my react SPFx WebPart is not working in IE 11

I want you to help me with the IE11 issue. Thing is my SPFx web part was not working on the IE browser, I tried various Polyfills and some core-js modules but none of them worked. Later on, I found ...
2
votes
2answers
53 views

cdnBasePath in Modern Web Parts

I am new to both SPFx web-parts and the O365 CDN. My question stems from my newness in both areas. I have managed to enable the CDN in my tenant and define a couple of Origins. My understanding is ...
1
vote
1answer
31 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
13 views

Pass Array Values from webpart.ts to Main.tsx

I am fetching data from webpart.ts using this.properties.data and present it as list items in Main.tsx. However, It only displays as a string like Select Google rather than select Google What am I ...
0
votes
1answer
30 views

Get column value, not ID, from a look up column

thank you for reading; my problem is: I want to retrieve the values of the column "GroupWithPriority". That column is a Look Up from other list. When I try to get the value, all I get is "...
1
vote
1answer
22 views

Sharepoint Property Panel Add Button and show Added Items

I am trying to make Links applications. On the property Panel, the user can select what links to add on this web part. After the user Selects the Title of the link, the user clicks Add. I expect to ...
3
votes
2answers
2k views

Office UI Fabric DetailsList(React) rendering: DetailsColumn.render() error

I am trying to add a very basic implementation of the Office UI Fabric's DetailsList React component to my project, but keep on getting the following error when trying to render it: 'DetailsColumn....
2
votes
2answers
29 views

how gulp serve related to sharepoint spfx webpart

I have created the sample spfx solution and uploaded it into the app catalog and i have added it to the site page. if I am changing in the local code and if I run the gulp serve the actual changes are ...
1
vote
2answers
42 views

How do you use componentDidMount and componentDidUpdate in a BaseWebPart class?

Someone told me that he was using componentDidMount and componentDidUpdate in his BaseWebPart class, but looking at the documentation below I realized it shouldn't be possible since it's not a React ...
3
votes
1answer
55 views

How can I obtain the Teams Context in Sharepoint?

I'm developing a WebPart that will be used with Sharepoint and Teams. My question is easy, I need to retrieve the the microsoftTeams context to get the username. How can I do it?. So far, I have ...
3
votes
1answer
69 views

SPFx Loading Issue

I have created the SPFx Project with extension and Web parts. It is working well if I run gulp serve. If I refresh the browser page it is not loading. It throws an error. If I copy the same URL ...
0
votes
0answers
25 views

SharePoint Framework REACT: Get User Photo using Graph API not returning image

Iam trying to get Users Photo by using Microsoft Graph API. By testing GET request in Graph Explorer i get the result, i can se the image. It means REST query works using Graph explorer. GRAPH ...
0
votes
1answer
33 views

SPFx development - npm audit vulnerabilities

The company I work for needs custom web parts in modern SharePoint. I was humming along following the excellent (Microsoft's sponsored) tutorials on SPFx development. I got my web part working on my ...
2
votes
1answer
901 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 ...
0
votes
1answer
2k views

set office ui fabric datepicker format

How to set date format in UI-Fabric DatePicker component ? my code here <DatePicker firstDayOfWeek={firstDayOfWeek} strings={DayPickerStrings} placeholder="select date..." /> I ...
0
votes
1answer
100 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
1answer
35 views

Unexpected error when adding webpart to modern page

I've been having trouble adding a custom web part to my modern page. I was able to add the web part to a legacy site, but I don't have the same luck with modern sites. In the legacy site it works ...

1
2 3 4 5
16