Questions tagged [spfx]

General technical questions about the SharePoint Framework client-side development model.

Filter by
Sorted by
Tagged with
0
votes
2answers
72 views

How do you get to the inner error of a SPHttpClientResponse that's not OK/200?

I'm trying to do some error handling in an SPFx web part, and I can't seem to get to the inner error message of a response that's not what I'm expecting. In the following code snippet, I've ...
1
vote
0answers
16 views

How to use currentCultureName in place of currentUICultureName for locale files spfx

We have a site with variations in SP2016, the display language is in "es-es" but the variation language is "en-us". We add a webpart of spfx with locale resources for translate constants texts, and ...
1
vote
0answers
22 views

Can I get the content of a Site Page and use it inside my SPFx Web part?

I have a webpart which I want to fill with the HTML of a SitePage.aspx. If the user fills the SitePage with a Title, 3 blocks of text and an image, I wish to be able to use that exact same content ...
0
votes
1answer
76 views

Adding same webpart with different configuration, multiple times on the same page [closed]

I have created a SPFX webpart, so when I add this webpart multiple time on the same page then same data appears on both webparts even if they have different property pane configuration. The property ...
0
votes
0answers
17 views

How to change file opening behavior by SPFx ListView Commands Set or SPFx Application Customizer?

Is it possible to change click behavior of SPO for some file types? Which type of extension is better to use to achieve this aim: ListView Commands Set or SPFx Application Customizer ? I need special ...
0
votes
1answer
194 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 ...
1
vote
1answer
28 views

Is it possible to customize hub site programatically?

Is it possible to customize hub site programmatically using SPFx solution? My intention to ask this question was, i want to completely customize the menu with some images for every sublink. This is ...
0
votes
1answer
22 views

Is it possible to embed and Office 365 Video inside Custom WebPart?

We are building an Intranet (with modern pages) in SharePoint online with SPFx 1.9.1 and React and the client wants the possiblity to embed an Office 365 Video inside a custom WebPart (via Property ...
0
votes
0answers
61 views

Get Hub Site and Assocatied Com Site and Team Site with spfx

I am working on spfx solution with Reactjs v16. I was trying to get a Hub site named "Marketing" and all the hub sites associated with Marketing site including (Comm and Team sites) and render it ...
0
votes
0answers
54 views

Spfx Web Part - API call sometimes fails to execute

I have a custom web part that uses aadHttpClientFactory to authenticate with AAD and then get data from an API secured with AAD. It works flawlessly most of the time. Periodically, though, it gets ...
1
vote
1answer
50 views

Where is HttpClient and related classes in SPFx 1.1?

I am finally able to get started using SPFx. Stuck on 2016 / SPFx 1.1. The documentation for the HttpClient class says it's in the @microsoft/sp-http package. However, the Yeoman generator did not ...
0
votes
0answers
27 views

How to detect type of SP server in SPFX?

I'm writing SPFX extension that should work on both SP 2019 on-premise and SP Online. But due to bug in SP Online I have to split behavior of extension depend on type of SP server. Is it possible to ...
1
vote
1answer
165 views

How to get all items in list view from SPFX ListView Command set onExecute()?

Is it possible to get all (not only selected) rows\items in ListView when ListView Command Set onExecute() method is called? E.g.: @override public onExecute(event: ...
0
votes
0answers
34 views

SPFx Extension run only on startpage

I have created a spfx extension that applies styling that I just want to run on the startpage. How can i achieve it? Here is onInit method, i tried it and still applys the styling even when the "...
0
votes
1answer
37 views

Custom web part broken once deployed

I have a custom web part I created that works in the local workbench and the hosted workbench both but just shows "An unexpected error occurred" after I deploy it to my site. In the console, I get a ...
1
vote
0answers
91 views

Invalid selected rows in onExecute() of SPFX ListView Command set

Simple code just built from yo @microsoft/sharepoint wizard: Elements.xml: <?xml version="1.0" encoding="utf-8"?> <Elements xmlns="http://schemas.microsoft.com/sharepoint/"> <...
1
vote
1answer
289 views

How to add sub commands in my SPFX List View Command Set command

My SPFX contains extension that adds two commands in Document List: Elements.xml: <CustomAction Title="My Commands" RegistrationId="101" RegistrationType="List" Location="...
1
vote
1answer
349 views

Get current theme colors for SharePoint Online site in SPFx webpart

I have a SharePoint Online site with green theme color currently set. In my SPFx webpart I want to be able to get the current theme color (primary, secondary and tertiary) in TypeScript code. Below ...
0
votes
0answers
153 views

Depolying SPFX Web Part on On Prem 2019

I used the example from the Microsoft site. I used the 2019 and Online option and added nothing extra to the project. I packaged and published the web part. I was able to deploy it to our companies ...
0
votes
1answer
90 views

Properties how pass them array value

I want to ask how pass a array value to the properties. Always at first should be 'properties name', but I have got a lot repetable names. So I want give them to the Array. How I can pass them ? If I ...
0
votes
0answers
24 views

Search two different search boxes of List columns related data show on grid view based on text enter in SPFX?

Am able to search the PR_Number column data, the same i want to search for Description as input in another search box and show the gridview in SPFx. import * as React from 'react'; import * as ...
0
votes
0answers
29 views

SPFx Document Web Part Deprecated?

I am trying to extend the functionality of the Documents web part I have been trying to gulp serve this: Documents Web Part. But it is over 2 year old and localhost refuses to work (ERR_SSL_PROTOCOL)...
0
votes
1answer
144 views

Get User Photo, Name &Title of an office 365 group using SPfx

I am trying get the user details i.e. UserName, Title and Profile picture of users that belong to a office 365 distribution group. I tried this code sample, but I get an undefined error: ...
0
votes
0answers
103 views

SPFX and react-dnd

I promised myself never to write a StackExchange post with lots of code. But here we go. I am basically trying to get some basic drag-and-drop behavior working in an SPFX (1.9.1) web-part using ...
0
votes
0answers
17 views

SCSS in Sharepoint Framework Library Project

Looking for the proper way of constructing my projects. I decided to use one project per web part however is have a number of classes and react components that are common to all projects. So I ...
0
votes
1answer
402 views

SharePoint 2019 Standard vs. Enterprise, Updates / Release / Patch / Versions and the SharePoint Framework Releases

We have an SP2019 test farm running SharePoint Server 2019 Standard, version 16.0.10351.20000 (October 2019). I have a few questions regarding compatibility between SPFX development and SP2019 on-...
0
votes
1answer
244 views

Getting SharePoint news using rest API in SharePoint Online

Is there any rest API available to get the recent updates or news related to a site in SharePoint Online? How To Read The SharePoint News Using Rest API In SPFx I have found above post but it does ...
0
votes
0answers
88 views

Jest with SharePoint Framework. SyntaxError: Unexpected token export

I'm trying to do tests on an SPFx project with Jest and Enzyme. I have configured the environment using Andrew Connel's preset to test my solution with React and Typescript. After run 'npm test' I've ...
0
votes
0answers
14 views

What are not supported in MS Graph API in terms of SharePoint CRUD operations with lists/libraries

I wanted to implement SPFx solution with MS Graph API. but I found some of the things which are as limitations right now to deal with SharePoint lists, libraries. If any knows about limitations could ...
0
votes
0answers
19 views

GraphAPI with SharePoint lists CRUD including attachments

I wanted to create SPFx solution with below scenario I want to give all users readonly access at site, lists level I want to create a SPFx webpart which will add data to the lists (includes adding ...
1
vote
1answer
98 views

Property 'select' does not exist on type 'Web'

I'm trying to use @pnp/sp with SPFx like shown on pnp GitHub page: sp.web.select("Title").get().then(w => { console.log("title: " + w.Title); }); When compiling the following TypeScript error ...
0
votes
1answer
126 views

PNP JS Taxonomy Term retrieval not giving me back all terms in SharePoint online

I'm currently developing a WebPart for a client using SPFX, React JS and PNP JS where I need to get a full list of Countries from a Countries taxonomy at Tenant level to allow my to populate a ...
0
votes
2answers
487 views

How to stop gulp serve / workbench?

I just started my first SPFx project on SharePoint 2016. After I key in gulp serve the workbench prompt up. My question is, how to exit the workbench? In my DOS prompt it seems gulp is still ...
0
votes
1answer
18 views

'Details' button missing on installed app - in regards to performing an upgrade action

I am trying to perform an upgrade action on my SPFx web-part. In order to do so it is my understanding that I need to access this menu item called 'Details', but that seems to be missing on this app ...
0
votes
1answer
60 views

SharePoint Framework v1.1.0 requirement

I want to build my first spfx page on our SP2016 on-premise environment. Could you advice what is the requirement? I mentioned v1.1.0 because later version are not supported by SP2016 according to ...
0
votes
1answer
104 views

Image Carousel Video Autoplay true or False

I want to set autoplay true if it is video and false if it is image. I tried using setState inside autoplay as given below but it is throwing an error: autoPlay={this.setState({ autoplayvideo: true ...
0
votes
2answers
111 views

import interface in mystrings.d.ts

I want to add multiple languages to my spfx web part. Now I want to import some interfaces to my mystrings.d.ts declaration file. But when I do that it breaks the definition and I get a lot of errors ...
0
votes
1answer
102 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
0answers
4 views

Import locale key from component

i have a few components where i export a string as identifier for each component. At the root of my webpart "webpartname.tsx" i dynamicly load different components and there i reuse the exportet ...
0
votes
1answer
146 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
2answers
126 views

Powerapps or spfx to built forms in SharePoint online?

I need to create a few forms on SharePoint online, but first I would like to know which one to use PowerApps or SPFx? Can I use workflow on powerapps or spfx? Edit: the complexity of the form is ...
0
votes
1answer
50 views

Auto play false Image Carousel SPFX webpart

I have created image carousel SPFx web-part which is set as auto-play equal to true and on click of image there is modal pop up, its working fine. But when I click on image my modal pop up open but ...
0
votes
1answer
106 views

cdnBasePath Modern Webpart - Private Office 365 CDN

How should the the cndBasePath be in the write-manifest.json file if I want to use Private Office 365 CDN? { "cdnBasePath": "mytenant.sharepoint.com/sites/CDN/cdnlibrary/" //"cdnBasePath": "<!-...
0
votes
1answer
21 views

Modern SharePoint client side webpart code repo

I am wondering, if the OOB SharePoint Client Side webparts are open source or not? Let me give you a background, why I came to this point. I created a MS Flow manually triggered, added Column ...
0
votes
1answer
265 views

How to retrieve Image column from SharePoint list using React js SPFx

I am trying below TypeScript to retrieve the Image column using SPFx .Unfortunately image is not rendering on page. Please help me on this.
1
vote
1answer
47 views

Options to deploy SPFx webpart - SharePoint Online

What are all the options to deploy SPFx webparts to a SharePoint Online environment? Is it always necessary to have the .sppkg uploaded to the SharePoint App Catalog? What is the recommended ...
0
votes
3answers
370 views

Sharepoint Online No JS Framework, how can redirect to one modern page to another?

I am using: window.location.replace('https://site.sharepoint.com/sites/contosoSite') Also I tried using href. The problem is that when I clicked on the button for redirection the new page is ...
3
votes
1answer
136 views

Sharepoint Item rest query How to get the multiline column value which has append text property set true

I have a multiline column named as "Notes" in a list. This column has the "append text" property set to true. So when I retrieve the item I am getting this column null value. Please help me query this....
2
votes
1answer
196 views

Query site collection property bag in SPFx extension

I am building an SPFx Application Customizer for a Powell365 project, and trying to have it use custom properties from the current site collections's property bag. I already managed to get these ...
0
votes
1answer
78 views

Css overide for office fabri ui Pivot

How can we do padding left in office fabric UI CSS for pivot component , Want to padding of Pivot component its working on develoepr tool added screenshot for same but not able to override through css ...

1 2 3
4
5
24