Episode #125 of the Stack Overflow podcast is here. We talk Tilde Club and mechanical keyboards. Listen now

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.

57 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
3
votes
0answers
1k views

“Error: Token renewal operation failed due to timeout” in adal.js SharePoint Framework React

I have developed a webpart to get Azure users using SharePoint Framework React with graph api. But in Adal.js file getting following error: Error: Token renewal operation failed due to timeout I ...
2
votes
0answers
774 views

@types/react and @types/prop-types errors when building with gulp build or gulp serve

For my team's project, some of us are hitting a type issue when building. We're using version 1.7.0 of all the @microsoft/sp- packages. tslint version: 5.9.1 typescript version: 2.4.2 Build tools ...
2
votes
0answers
53 views

I need to get all properties of taxonomy termstrore. which I already get are “Label”,“WSSId”,“TermGuid” but I need to get Other labels as well

Is there any solution to get other properties for taxonomy termstore. As I remember, I usually used "include" to get all properties which I mentioned in JSOM. But now I need to work by using ...
2
votes
1answer
620 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 ...
2
votes
1answer
490 views

Display SPFx Application Extension differently in Read/Edit mode of a Site Page

Question: Is there a utility built into SPFx or a React library to change what to render based on if the page is in read or edit mode? Or more exactly, a way to switch the rendering when switching ...
1
vote
1answer
33 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 ...
1
vote
1answer
50 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 ...
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 ...
1
vote
1answer
160 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 ...
1
vote
2answers
160 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
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 ...
1
vote
0answers
55 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 ...
1
vote
0answers
59 views

I want to upload the document in SharePoint online document library with content type

My code - sp.web .getFolderByServerRelativeUrl("Student%20Details%20No%20Content%20Type") .files.add(fileContent.name, fileContent, true) .then(f => { f.file.getItem()....
1
vote
0answers
251 views

Set TaxonomyPicker with initial values from term store SPFx

I've created a command set for creating and editing a new product and save it into a SP list. That list uses a term set for the categories. When a product must being edited, the ProductEditor ...
1
vote
1answer
106 views

How can I create webpack package of SharePoint online for react App?

I can create package of react app for SharePoint online by using "gulp serve" and "gulp package-solution" commands. However, I want to create package by using Webpack. How can I achieve this?
1
vote
1answer
159 views

Office UI Fabric Ract Command Giving an error UNMET PEER DEPENDENCY

Issue while adding command "npm --save install office-ui-fabric-react" NPM Version: @microsoft/generator-sharepoint@1.0.2 gulp@3.9.1 yo@2.0.2 How to solve this issue? It gives warning:office-ui-...
1
vote
1answer
296 views

SPFx get all sites were user has permissions

is there a way to get all site collections and subsites where the current user has access to? I would like to build a web part in SPFx and in React. Any suggestions are welcome. Thank you.
1
vote
0answers
821 views

Using SP-PNP-JS to get data from custom content type fields with React

I'm currently making News Listing Web Part, where News are made as custom content type. I managed to get the basic fields like id, title, but others are really bothering me. The API fetches all the ...
1
vote
1answer
319 views

how to display two sharepoint list data separately in react?

my requirement is i have to display 4 list separately under collapsable panel but the problem is, I am not able to segregate the list , is there any way? help me. export interface IMyWorkListState { ...
1
vote
1answer
227 views

SPFx - How to protect and minify my output bundle.js

When i deploy my solution.sppkg i want to protect my output bundle js to avoid js injection? How to minify bundle.js with gulp task? How to do this?
1
vote
0answers
416 views

Sharepoint 2013 Hosted Add-in using React and React router

I have a reach JS app that uses react router. As a stand alone it works perfectly. I am now trying to use it in a SharePoint hosted app. I created the app using create-react-app from github. When I ...
0
votes
0answers
8 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
1answer
18 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
45 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
0answers
54 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
28 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
31 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
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 ...
0
votes
1answer
52 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
87 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
1answer
32 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 ...
0
votes
1answer
59 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
101 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
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
24 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
0answers
77 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 ...
0
votes
0answers
215 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
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?
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.
0
votes
1answer
296 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
657 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
0answers
48 views

Sharepoint SPFx active toggle in list view

I'm new with SharePoint Framework and I want to achieve something like this: Github - React Field Toggle This solution is for SPFx v1.3 and in my environment (SharePoint Online) it's not working even ...
0
votes
0answers
96 views

package error when building spfx webpart

I am using the following breadcrum sample. To reproduce the error use command: gulp serve Error I got: ./src/extensions/siteBreadcrumb/SiteBreadcrumbApplicationCustomizer.ts Module parse failed:...
0
votes
1answer
301 views

Multiple attachment upload causing 409 conflict error. (SPFX, PNP)

I have noticed a bug when using the PnP library for SPFX to upload multiple attachments. Using: sp-pnp-js@3.0.10 targeting: SharePoint Online Expected Behavior Question When uploaded multiple ...
0
votes
0answers
126 views

SPFX: Custom action to move bulk document from one library to another and adding metadata to these files

My scenario: I need to be able to bulk move files from one library to another and also bulk add metadata to those newly move files. I thinking of creating an spfx/react application or any method is ...
0
votes
1answer
34 views

Possible to track session of user in sharepoint?

i just got a requirement to modify some code in my SPFX app to detect a user sessions. the requirements is that i have to lock that specific list which is tracked by a separate tracking list (schema: ...
0
votes
1answer
79 views

SPFX Textarea Render Issue in IE11

I have the above Textarea displaying some dynamic address, it displays and keeps my CSS styling as wanted in Chrome (Version 67.0.3396.99 (Official Build) (64-bit) ) with no border or other issues but ...
0
votes
1answer
84 views

Implement taxonomy field on a custom react app

I am developing a custom react app. I need taxonomy and people picker controls on the app. Please let me know if this is possible and if yes, how.