Questions tagged [spfx]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
5 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
12 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
10 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
16 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
23 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
32 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
22 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
12 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
36 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
42 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="...
0
votes
1answer
27 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
28 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
25 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
17 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 ...
-1
votes
0answers
27 views

Not able to getting the result in grid-view after i text enter in text-box in SPFx

Not able to getting the result in grid-view after i text enter in text-box in SPFx. Framework: no-java-script framework selected. this is my code: import { Version } from '@microsoft/sp-core-...
0
votes
0answers
20 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
39 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
30 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
13 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
50 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
0answers
50 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
21 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
13 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
15 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 ...
0
votes
0answers
16 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
0answers
19 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
32 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
16 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
33 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
60 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
45 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
53 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
3 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
28 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
37 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
32 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
22 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
16 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
63 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
34 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
56 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/ExternalSharing') Also I tried using href. The problem is that when I clicked on the button for redirection the new page is ...
3
votes
1answer
33 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....
1
vote
1answer
50 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
32 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 ...
0
votes
3answers
53 views

SPFX property pane changing on page refresh

I have added few controls to property pane, I have few labels which get updated on button click as shown in below image But once the page is refreshed, the label values are lost as I am using an ...
0
votes
2answers
19 views

How can I use Yarn to download Sharepoint Framework (SPFx) dependencies, for offline use on a VM which is not connected to the internet?

I am starting to read and learn about SharePoint Framework (SPFx). My development environment is a VM on a machine that does not have access to the internet. How would I go collect all the ...
0
votes
1answer
22 views

Argument of type '{ description: string; siteurl: string; }' is not assignable to parameter of type

For SPFx running gulp serve getting below error. For this line it was working before: public render(): void { const element: React.ReactElement<IReactGetitemsProps > = React.createElement( ...
1
vote
3answers
68 views

Using JQuery with SharePoint Framework

Reading this tread (Add jQuery in Client Web part (SPFX)) I'm going to open a new question with another problem. I am also following the accordion tutorial from Microsoft docs and trying to customize ...
0
votes
1answer
97 views

Image Carousel Spfx webpart

Hi I am working on SPFx image carousel web-part using react responsive carousel. I want that if user click on image on carousel it will show detail description of image in modal dialog on same page: ...
0
votes
0answers
15 views

SPFx Command Set on a subset of document libraries

I am working on a scenario where I have multiple document libraries and I would like to enable a Command Set button for custom approval only on a subset of those libraries, so effectively have 2 types ...