Questions tagged [react]

React is a JavaScript library for building user interfaces. It uses a declarative paradigm and aims to be both efficient and flexible.

Filter by
Sorted by
Tagged with
0
votes
0answers
30 views

What are the supported office UI fabric versions for SPFX 1.1.0

There are many threads and answers regarding this question. But i didn't find a satisfying answer. I am currently working on a SPA for SharePoint 2016 OnPrem. I scaffolded my Project with the Yeoman ...
2
votes
1answer
30 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
23 views

i am getting error on getting the ID here

RetrieveSPData(){ var reactHandler = this; jquery.ajax({ url: `${this.props.siteurl}/_api/web/lists/getbytitle('items')/items?$select=ID', type: "GET", ...
0
votes
0answers
19 views

Fields of Special Characters SharePoint List is not created in React project

I have created below function in separate library to create list and its 3 fields in the react project, however, its working with normal character SharePoint list but not with special characters list ...
0
votes
1answer
64 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
0answers
23 views

SPFX : TypeError: external__react_.useContext is not a function

I am using office-ui-fabric card in my spfx web part. Getting the error as below. createComponent.tsx:51 Uncaught TypeError: external__react_.useContext is not a function at result (...
0
votes
1answer
15 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
1answer
244 views

What is this strange error: Tuple type element list cannot be empty

Environment: SP2019 onprem SPFx version: 1.4.1 All of sudden below error is coming while doing gulp build or gulp serve. A tuple type element list cannot be empty.Error - typescript - src/...
0
votes
0answers
52 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 ...
2
votes
1answer
700 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
40 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
1answer
811 views

Uncaught Type Error: Cannot read property 'post' of undefined

The below is my code import * as React from 'react'; import styles from './PostTest.module.scss'; import { IPostTestProps } from './IPostTestProps'; import { escape } from '@microsoft/sp-lodash-...
0
votes
1answer
37 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 ...
1
vote
1answer
41 views

Sharepoint online/365 integration (Upload files) on React app hosted on Azure and WebApi C# .Net Core 2.2

I'm struggling since some weeks ago trying to interact/automate a way to upload files from a Web App created in React and upload files to a Sharepoint Online Site – in a specific folder. The WebApp is ...
0
votes
1answer
80 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.
0
votes
1answer
44 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
1answer
2k views

Get data from multiple lists using REST API

My requirement is: To pass listnames as an array to a method and concatenate the result after each success. The problem is I'm not able to concatenate the result from the previous ajax call ...
0
votes
2answers
525 views

React Native (Sharepoint-application)

I have started learning to code in react native. Have an idea of trying to create an application that (creates / updates / deletes) data from SharePoint lists. My question is: How do I create a ...
0
votes
1answer
129 views

spfx webpart react rest api

I am using REST API in my SPFx web-part and passing parameter in REST API but its not working as expected , there is some mistake in writing REST API within `` as parameter is not working: export ...
0
votes
0answers
100 views

SPFX Add webpart dynamically at runtime

I'm trying to render webparts dynamically at runtime. I have almost no experience with react, so this is where I'm stuck (I think). Using pnp-js I can get the webpart definition and manifest like ...
0
votes
0answers
64 views

Getting error: “Cannot read property 'getCurrentStack' of undefined”

We have implemented kendo's editor in the SPFx react project. Code: <Editor tools={[ [OrderedList, UnorderedList], [FontSize, FontName, FormatBlock] ]} /> The ...
0
votes
1answer
42 views

How can I add custom button in the kendo's editor for SPFx react project?

We will use below kendo code to add custom button, this custom button will use to upload document to one drive location:: <Editor tools={[ [Bold, Italic, Underline, ...
0
votes
2answers
114 views

How to render HTML value e.g “<div><div>Go to Google</div><div>Search on spfx react project</div></div>”, in SPFX project using type script?

We have created spfx react project for SharePoint online using type script: Here, props.appendTextDetails value is "Go to GoogleSearch on spfx react project". const FCRichtext = (props:any) => { ...
0
votes
0answers
37 views

Programmatically change a Date field

I have a form/web part where the user can edit columns. It works, but when the user needs to change value in a date column, it doesn't work. First I have the input form: <Calendar ...
0
votes
1answer
29 views

How use result of pnp response

I use PnP for getting SharePoint list item. But I don't really know, how use the result of my function. I wish to get items of my SharePoint list using PnP and assign it to my list. My code don't ...
1
vote
1answer
86 views

Migrate Current React JS Project to Run in Sharepoint

Our team has created a React SPA that is js based as opposed to ts. From what I've seen, creating and utilizing a webpart requires typescript. This project is fairly large so I guess I'm just ...
0
votes
1answer
83 views

Programmatically trigger flow and send properties

I want to manually trigger an external flow from my SPFx project, and at the same time send values to the flow. In flow, I have my request body: { "$schema": "http://json-schema.org/draft-04/schema#...
0
votes
1answer
60 views

Assign permission of the current user to a list item programmatically

I am making an event web part which is connected to a list of items. When a user attends an event, a json object will be parsed to a txt document that is attached to that particular list item /event. ...
0
votes
1answer
230 views

SPFX Tiles webpart

Hi I am new to SPFX and react JS , i like to create Tiles webpart from sharepoint list where it will render all properties of tiles from list like icon, colour,text, I had tried using office fabric ...
0
votes
1answer
178 views

What are the supported office UI fabric versions for each SPFx versions?

It is so confusing that some parts of office fabric will not work as expected with different SPFx versions. I have created a SPFx solution for SharePoint 2019 on-Premise. Following things are not ...
1
vote
0answers
27 views

React button to open SharePoint Document Picker

I have seen and experimented with the Property Pane controls that allow you to select a document or image from a pane and was curious if anyone has seen this same capability available from a button ...
0
votes
2answers
266 views

Creating a SPA (single page App) on SharePoint Online

I am new to the SharePoint world & I have been assigned to make a Single-page Application using any Framework (ReactJS/Angular) on SharePoint online (Microsoft 365). The Application needs to take ...
0
votes
1answer
157 views

Get the selected item (item id) of SharePoint list (On Premise 2019) with SPFx and React

I am trying to customize the edit form of SharePoint list using web part SPFx. I need to get "item id" of selected item and the send it with query string to new page (custom edit page). have you any ...
1
vote
1answer
84 views

JSOM in React, 'SP' is not defined no-undef

I am making some tests in order to update a page on sharepoint on premise 2013. The goal is to use reactjs to modernize this page. However, when I try to use JSOM, especially to create an item, I ...
4
votes
4answers
485 views

How to catch navigation event in SPFx webpart?

Is it possible to catch navigation event inside Sharepoint Framework web part? I know this is possible in application customizer using context.placeholderProvider.changedEvent, but I cannot find ...
1
vote
2answers
258 views

spfx webpart/component with position: fixed

I'm trying to create a spfx-react webpart for SharePoint Online like the feedback button on the walmart page (https://www.walmart.com right side). This works in edit mode and in the workbench (local ...
1
vote
1answer
232 views

SPFX - React JS : How to handle an empty list

SPFX-ReactJS newbie here. Wondering how I should handle an empty list. I am trying to connect my web part to a list and simply display them on my web part and automatically update the page as items ...
0
votes
1answer
40 views

MaterialUI packages throwing error in SPFx solution

Environment: SPFx with Office 365 I have created a SPFx solution with 1.8 as @microsoft/sharepoint version. I am trying to utilize material UI. so I have installed npm install @material-ui/core into ...
2
votes
1answer
175 views

SPFX and React : Component not rendering correctly because of findDOMNode returns null

I am a new React learner, and I may have a situation with render() and findDOMNode. What I have and what is the wrong behavior : I'm quite new to React so, I may have done lots of mistakes there. I ...
0
votes
1answer
74 views

Small styling discrepancies using React with Material-UI in SharePoint Online (non-SPFx)

When I build and publish my React application which uses Material-UI, to SharePoint Online I see a couple of small styling issues. It appears SPO's styling is being inherited by my Material-UI ...
0
votes
0answers
131 views

SPFX Conditionally display fields in custom web part (react-list-form)

New to SPFX - I'd like to implement the custom web part react-list-form. Everything looks and works great, except I also need the ability to conditionally show / hide certain fields based on other ...
0
votes
1answer
1k 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
47 views

SPFx not rendering correct amount of items after selecting number with slider

I am currently building my RSS webpart in SPFx with React. It is almost ready but I have a problem with rendering the correct amount of items after choosing how many items I want to render. Initially ...
0
votes
0answers
27 views

Getting only blue color in SPFx even though another color in SCSS

I am having trouble after with getting the desired color in my RSS webpart in SPFx. I get the standard blue from SPFx even though I have specified a background color. This question is related to the ...
0
votes
1answer
340 views

SPLoaderError loadComponentError

I clone the mentioned SharePoint App. Did a npm install. When I run gulp serve, it shows the following error. Please do the needful. [SPLoaderError.loadComponentError]: ***Failed to load component ...
1
vote
0answers
83 views

(Problem)SPFx rendering items from RSS after selecting number of items you want to display with slider

I am currently building an RSS webpart in SPFx using React as a framework. Now I am in the stage that I want the user to be able to select how many news items he/she want to see with a slider (taken ...
0
votes
0answers
30 views

Debugging react based modern spfx webpart using hosted workbench issues

We have been successful in developing multiple custom modern Web Parts against two tenants ( one used for development and one for build. Until recently the standard debugging method of serving from ...
0
votes
1answer
55 views

SPFx React webpart is not displaying all XML items from RSS News Feed

I am currently building an RSS News Feed in SPFx using React as a framework and using an XML link https://feeds.expressen.se/nyheter/ (Swedish news if curious). I can display all items, in this case ...
1
vote
0answers
114 views

Issue with rendering XML data in SPFx

I am in a project of making a RSS feed in SPFx and using React.js and TypeScript. When I try to retrieve XML data from a news site, the console gives error: Because it complains about CORS, so I ...
1
vote
1answer
2k views

Anyone can explain the .ts file and .tsx file use and difference in SPFx react webpart?

In SPFx No JavaScript Framework webpart contain "webpart.ts" file and write code in it. But in React SPFx webpart, there are 2 file : 1) webpart.ts file 2) webpart.tsx file in component folder. ...