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
1answer
14 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
30 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
0answers
20 views

Issues Or tasks that cant be done using React framework in spfx [closed]

I wanted to know what are specific functional/technical tasks that cannot be completed using React in spfx
0
votes
1answer
39 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
28 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
vote
1answer
32 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
61 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
50 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
25 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
34 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
0answers
30 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
74 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
1answer
28 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
45 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
37 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
27 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
47 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 ...
0
votes
1answer
100 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 ...
1
vote
0answers
25 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
87 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
86 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 ...
0
votes
2answers
80 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) => { ...
1
vote
1answer
46 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 ...
1
vote
1answer
146 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
31 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 ...
1
vote
2answers
152 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 ...
0
votes
1answer
58 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
94 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
0answers
39 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
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
26 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
0answers
21 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 ...
1
vote
0answers
82 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
1answer
45 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 ...
0
votes
0answers
76 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
551 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. ...
1
vote
1answer
45 views

Problem with SharePoint version

I'm creating all my projects with yo @microsoft/sharepoint I tried to specify a version but it ignore me, and I have to change manually the version every time from 1.8 to 1.7.1, and if I create a new ...
0
votes
0answers
209 views

Implementing discussion board in modern sites using SPFx

Consider we have a page on which list items details are being rendered, one at a time using list item ID passed as query string parameter. I understand that we have the comments section feature ...
0
votes
1answer
59 views

Update React Version on SharePoint Server 2019

From what I've been able to tell, SharePoint Server 2019 is locked to React@15.6.2. Is there a way to update this to a more modern version? Is this something that a CU would update?
0
votes
1answer
42 views

Add column names dynamically to `select` method in SP PnP JS

In the select method of SP PnP JS how can I add column names dynamically? For e.g. can the below code sp.web.lists.getByTitle("My List").items.select("Col1", "Col2"); be written something like this ...
3
votes
1answer
126 views

Creating component in SPFx webpart from command line

Is there any way to generate component in React from command line (similar to Angular's ng generate)?
0
votes
0answers
19 views

How to explicitly add react-dom/server?

I need to explicitly add "react-dom/server" as an import at the root of the application - just wondering how I go about this?
1
vote
0answers
54 views

SPFX Webpart with Dropdown don't work on Classic pages

I currently have a spfx web-part which contains a dropdown, when I add it to a classic page and try to use the dropdown when the SharePoint ribbon displays the Format Text tab, the dropdown keeps ...
0
votes
0answers
7 views

how to display a react application in all page instade of just frame?

how i can display all my react application devloped in Fabric ui and gulp and yo microsoft/sharepoint? please clear ansewer. Thank s in advance.
-1
votes
2answers
141 views

How to retrieve context in SPFx 1.1.0?

Good morning, I need to create a spfx element to sharepoint 2016. the project dependencies are: "react": "15.4.2", "react-dom": "15.4.2", "@types/react": "0.14.46", "@types/react-dom": "0.14.18", "@...
0
votes
2answers
700 views

How to clear Office-ui-fabric-react fields after object has been added to list?

I have a simple list that gathers info from two text fields, a drop down and a people picker. I am able to submit to my custom list. I have set the state back to the defaultValue, which I have defined ...
1
vote
1answer
429 views

Problem with rendering a React component in another component for SPFX

This is my first post here, I guess :) I am writing because I have a task to make a Shopping app which should be made in SharePoint Framework and use React as a framework. My current problem is ...
4
votes
1answer
406 views

Including React Kendo Grid in SPFx web part throws warnings during build

I have got a kendo grid built into a SharePoint SPFx web part. All works great in my local work bench however when I go to build the kendo components give lots of errors. Seems to be a known issue ...
0
votes
1answer
288 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 ...
0
votes
1answer
28 views

This function always return extra values

While calling the function always get "x" extra added value . Suppose I have received 3 values on 1st call , next 2nd call I received (3 + 3) values , and on 3rd call (6 + 3) values . But I want to ...