Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
17 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
42 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
30 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
20 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
123 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
72 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
11 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
24 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
16 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
41 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. ...
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 ...
1
vote
1answer
38 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
79 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
28 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
19 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
48 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)?
1
vote
2answers
159 views

Can I use SPFx 1.7 with Sharepoint 2016 Feature Pack 2 updated to the latest January 2019 patch?

We have an on-prem Sharepoint 2016 server which has been kept up to date with the latest security and feature updates and patches. We want to build a client application using SPFx Web parts, ...
0
votes
0answers
12 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
47 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
5 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
2answers
63 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
194 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
115 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 ...
1
vote
1answer
157 views

Office UI Fabric React People Picker Remove 'X'

Is there a way I can have certain personas unremovable from people picker? I was thinking how I can remove the X button: On the screenshot, I need to disable removal of test user2 and Test 115 while ...
4
votes
1answer
300 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
24 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 ...
-1
votes
1answer
58 views

Debounce in sfx react

The code I am using: <TextField onChanged={e => this.handleCommChange(e, 'Contact')} private handleCommChange(e: any, controlType: any): void { const { temp_items } = this.state; const ...
4
votes
1answer
48 views

Create-react-app version 2 not compatible with SharePoint?

I'm trying to make a web part with React (not SPFx, just a regular mini React app) for use in SharePoint. I have done so successfully with version 1.x of react-scripts, but now 2.x is out, with ...
1
vote
1answer
65 views

Selecting a date in 2nd date picker clears the 1st date picker (UI Fabric React)

I'm making a SPFx webpart and I've 3 date pickers. See images below. First I start with 3 empty date pickers (oké they looks good) Then I select a pick up date (no problems so far) Then I select a ...
1
vote
0answers
53 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
130 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
107 views

How to upload file in document library using pnp/sp

I have written code to upload the file in SharePoint online .. but while upload the page gets refreshed .. Please help . Code - sp.web .getFolderByServerRelativeUrl("Student%20Details%20No%...
1
vote
1answer
365 views

Want to open popup in button click SPFX React

I Want to show modal popup in spfx react webpart. Below is the code I am using: <div> <button onClick={e => this._OpenModal(this)}>Open Modal</button> <div id="myModal" ...
1
vote
1answer
78 views

I want to call one child component from parent component spfx react

I want to call SPFX react child component from parent component . But I am getting error while creating react component . Error: Declaration or statement expected. Cannot find name 'div'. Type '...
0
votes
1answer
147 views

Provisioning SPFx WebPart assets: adding a page with your webpart embedded to it

As far as I can see it should be doable to create a package which can automatically, once the app is added to your site, to create a page and embed the webpart on it - as described here: https://...
2
votes
0answers
51 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
304 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-...
1
vote
0answers
349 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 ...
0
votes
3answers
379 views

Deploy spfx webpart without using cdn

I am currently developing some spfx webpart and i have deployed the webpart and using a SharePoint library as cdn. My question is: Can i deploy the webpart without using a cdn?
0
votes
0answers
31 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
1answer
121 views

Spfx breadcrumb not working on modern team site

I am using the following breadcrum sample. I have deployed the latter to app catalog and it works fine in a developer site with modern pages/library but it doesn't work in a modern team site.
0
votes
1answer
193 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:
2
votes
1answer
47 views

Get list of alerts of the current user from the whole site collection

My scenario: i want to create a spfx web part that uses a rest API that will query all the alerts throughout the whole site collection for the current user. I want to know which API to use and ...
0
votes
1answer
298 views

Upload attachment to List Item using React & Axios (REST API)

Well the title pretty much sums it up. I've got a custom form outside of sharepoint that creates/updates/views items from a sharepoint list using Rest API (with accessToken). Now i need to be able ...
0
votes
0answers
65 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:...
1
vote
1answer
81 views

Office UI Dialog not showing correctly on SPFX Web part

On the SharePoint Workspace the UI dialog works fine. The dialog comes out when you click on Forward Case. When I have gulp packaged the solution and adding the app (locally on gulp) then I get this ...
0
votes
1answer
169 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 ...
1
vote
1answer
45 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?
2
votes
0answers
44 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 ...
0
votes
0answers
98 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 ...