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.

44 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
47 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
455 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
399 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
55 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
40 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
76 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
48 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
54 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
158 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
0answers
445 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 ...
1
vote
1answer
61 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
137 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
233 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
701 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
213 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
193 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
383 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
1answer
19 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
30 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
25 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
31 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
21 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
16 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
26 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
119 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
14 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
6 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
161 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
383 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
32 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
70 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
203 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
108 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
32 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
73 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
71 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.
0
votes
1answer
47 views

Saving data from a multi-page react app

I am trying to emulate a sharepoint new form in a custom react app of multiple pages. My problem is how will I store the data that user enters across multiple pages and save it in the sharepoint list. ...
0
votes
0answers
669 views

Property 'serviceScope' does not exist on type 'IWebPartContext'

I'm trying to Recreate this sample/demo I face a problem when I try and run the same or create it from scratch myself. I get the following 2 errors: error TS2339: Property 'serviceScope' does not ...
0
votes
0answers
54 views

Debugging React components in spfx client side webparts

How can I step through my .tsx code file line by line? Either using Google Chromes developer tools or Visual studio code the debugger steps into internal Typescript/JavaScript libraries? It becomes ...
0
votes
1answer
208 views

SPFx -Error when use last version of Office-UI-React with SPFX 1.4.0

I want to use last version of Office-UI-React with SharePoint Framework v 1.4.0 with TypeScript Version 2.2.2. When i install last version office-UI-React have following error:
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
0answers
154 views

CROSS domain calls in SharePoint Hosted App with React JS

I am developing a SharePoint hosted app with React JS for SharePoint Online. I am Using Typescript and web pack for the same. I am able to get items from the Lists from App web without any issue with ...
0
votes
1answer
103 views

Ribbon not initially rendered when using CSR in conjuction with React and TypeScript

we have designed a few custom fields using CSR, TypeScript and React. On our AllItems.aspx, we use this to render a link for a "cross-site" lookup field which is really just a text field holding a ...