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
22 views

SP fast deploy error “File not found”

I've been getting this error but the bundle file is already present. Can anyone help me out Fast deploying to SP App C:\Users\xanderCage\Desktop\xanderCage.Apps.SharePoint-Dev1.0_react\OnboardingApp\...
0
votes
0answers
18 views

Sharepoint SPFX react/typescript mobile layout

So I created a Sharepoint SPFx React Typescript app which works perfect. Using this guide here I design a mobile version of the web part app: https://goshakkk.name/different-mobile-desktop-tablet-...
2
votes
1answer
35 views

Retrieving data from rich text editor in spfx web part properties

I am currently creating a custom web part, the webpart is using PropertyFieldCollectionData to collect user data (https://sharepoint.github.io/sp-dev-fx-property-controls/controls/...
1
vote
1answer
25 views

Object notation react map groupby

I am trying to group an object by division. I am not able to figure out how to map them. So the object notation is something like below > Object.keys(this.state.ListItems).map(function(item,key) &...
1
vote
1answer
22 views

React List Keys row edit PNPJS dropdown & People Picker

I am trying to enable row edit for a particular array of People Picker and Dropdown controls. Below is what I have so far, <table cellSpacing="1"> <div className={styles....
2
votes
2answers
46 views

React Props in main component, change to state on change dropdown

I have a main component that is calling a list. I am passing this item to one of the components prop which is the value of a dropdown. For me to be able to setstate, I assigned the prop to state ...
1
vote
2answers
42 views

How do you use componentDidMount and componentDidUpdate in a BaseWebPart class?

Someone told me that he was using componentDidMount and componentDidUpdate in his BaseWebPart class, but looking at the documentation below I realized it shouldn't be possible since it's not a React ...
0
votes
1answer
22 views

Uncaught (in promise) TypeError: sort is not a function react spfx

var currStatus = ''; var job = [...this.state.data]; return <div> { job.length ? <div> { Object.keys(job).forEach(jobTree) => ...
0
votes
1answer
24 views

Using PnPJS Library to display list of data

I'm building a SPFX React webpart. I currently have the webpart on my SharePoint site's workbench page. Here is the code that I'm currently using: private _renderListAsync(): void { // Local ...
0
votes
1answer
50 views

Retrieve data from SharePoint list via PnP JS and CAML Query

I wanted to display all files which have the property" Job" = "Job1" how to retrieve list view items using PnP JS and CAML Query here is the CAML Query ? <ViewFields> <FieldRef Name='...
1
vote
1answer
25 views

How to get items from SP list using query and @pnp/sp and Filtering

I have a getItems function that accepts a filter, but I need to know how to pass in two different filters so that I can retrieve items filtered by both Age and First Name. Here is the definition of ...
0
votes
1answer
48 views

SPFX save array inside item response to display in render react

I am facing simple issue where I need to get value of an expanded person field in react. I am receiving the title and was able to assign it to a variable, but my need is to automatically get the value ...
1
vote
1answer
54 views

Rest API throws 403 when using POST Fetch in React app

I have a React App which is deployed to SharePoint application folder in IIS. When I try to create a folder using rest api, it throws: http://sp2016:5155/_api/web/folders 403 (FORBIDDEN) const ...
0
votes
1answer
111 views

SPFX page context react

I am developing a multiscreen webpart, I am using react framework. I am not able to get the context to load in the webpart file(.tsx) Below is the code so far. There were 2 issues initially, one was ...
0
votes
2answers
84 views

SPFX MSGraphClient - Cannot read property 'id' of undefined

I am getting this issue when calling Shared and Recent OneDrive files using MS Graph Client on my modern webpart. Uncaught (in promise) TypeError: Cannot read property 'id' of undefined I get the ...
0
votes
0answers
12 views

getClient() undefined in SPFx React component [duplicate]

I am currently building an app that should send message from an SharePoint Framework app with React using Microsoft Graph. I have a problem with getClient method in my React component but not in the ...
0
votes
2answers
62 views

Problems with MSGraph POST in SPFx React

I am fairly new to MSGraph and I have a problem with the POST request. I am currently building an app in SharePoint Framework with React which should send a message to the typed email with subject and ...
0
votes
1answer
63 views

SPFx - React - OfficeUI Fabric - Assign value from SharePoint List Item to DatePicker and DropDown Controls

Thank you for your reply. I have values stored in SharePoint list. Now I want to provide edit functionality to user so when user selects particular item, I’m showing user the fields in editable mode ...
0
votes
1answer
32 views

How to return additional columns via SharePoint search API

I have a get request which grabs documents and saves them into state: public getDocuments() { axios .get("https://bpkintelogydev.sharepoint.com/_api/search/query?querytext='...
0
votes
2answers
125 views

I am using pnp peoplepicker in spfx and I want to clear the selected value by user on this people picker by code

Here is the people picker I am using within my component's Render: <PeoplePicker context={this.props.context} titleText="" personSelectionLimit={1} groupName={""} showtooltip={true} selectedItems=...
1
vote
2answers
83 views

Is possible put React JS on Sharepoint Extension?

I am new to SharePoint development, and in need to create a custom side panel (with React), when click on item of list view. Is it possible to use React JS while developing SPFx extension?
0
votes
1answer
90 views

SPFx React webpart onAfterPropertyPaneChangesApplied

I have created simple web-part in react and spfx for sharepoint online. In this web-part weather.tsx have all rendering and function of the web-part. In componentDidMount function I call external API ...
1
vote
2answers
75 views

PnP Carousal Control Button style and dots

I have created react carousal from pnp controls, I was looking for help to style next and previous buttons and is there any way to add dots for the slides My Carousal Code public render(): React....
2
votes
1answer
65 views

SharePoint Online Modern Page Layout Column Size

I am trying to make three column page layout and I want middle column to be bigger than other two. How it is possible. Do we have to add anything into spfx web part or is there other way !!
0
votes
2answers
53 views

PnP SPFx Controls not rendering responsive

I have created one static web part using react carousal but it is not working as responsive. Please guide me if I am missing anything import { Carousel, CarouselButtonsDisplay, ...
2
votes
1answer
143 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
25 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
24 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
0answers
114 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 ...
1
vote
0answers
43 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
201 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 ...
0
votes
1answer
22 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
0answers
108 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
158 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
56 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
1answer
288 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
79 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
58 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
315 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
183 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
155 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
68 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
44 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
1k 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
33 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
298 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
266 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
82 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
546 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
474 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 ...