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 [typescript]

The tag has no usage guidance.

1
vote
1answer
145 views

Mapping json out to typescript in spfx

I have the following json output : "ParentTerm":{ "Name":"Accounting", "ID":"e8c3c601-d3e0-4499-b0ad-3b520924af15", "Root":true, "ChildTerm":[ { "...
0
votes
1answer
264 views

Why doesn't DOM element behave when setting visibility or display with SPFx/Typescript?

code snippets here produce/render expected data and alert box shows [object HTMLDivElement] the div will not hide; same is true using "visibility", "hidden" <p> <input id="...
3
votes
3answers
428 views

SPFX- Array.prototype.diff - (TS) property “diff” does not exist on type 'any[]'- es6 issue?

I have some code that takes a SP List item column (a news article tagged to one or more choice categories) and want to show that to users who have a user profile property with one or more categories ...
0
votes
1answer
261 views

Sharepoint Framework/PnP-JS/React : state Object doesnt work

I have created a property (age) in the state Object. However, I can not access this property in my code. I am getting an Error Message: Property 'age' does not exist on type '{} Here below is my ...
3
votes
1answer
937 views

how to use click event in html string in spfx (react)

I have a html string embedded in a map function like this pnp.sp.web.lists.getByTitle("Division").items.select("Title","ID").get().then((item: any[]) => divtree=item.map(per =>'<li id='+...
0
votes
1answer
2k views

SPFX list view WebPart with react, list data loaded with PnP js, but not rendering

I have created SPFX webpart with react framework. I successfully get data from SharePoint pnp bu in react data is not loaded. When I resize browser window then data displayed successfully. Please see ...
1
vote
2answers
158 views

I have upgraded from yeoman 1.3.4 to 1.4.0 and I cannot import mystrings.d.ts

I have a file mystrings.d.ts which contains :- declare interface IReactSearchBoxStrings { PropertyPaneSearchOptions: string; BasicGroupName: string; DefaultSearchResultsPageUrlFieldLabel: ...
0
votes
2answers
361 views

SharePoint 2016 On Premise Dev using SharePoint Framework

This is my first question in this forum ;) I need to develop SharePoint 2016 On Premises solution in Visual Studio using the SharePoint Framework. i did some RnD over it and found a nice articles on ...
2
votes
2answers
462 views

Add external libraries in SPFx?

How to add external libraries like material-ui to our Spfx Webpart? I know to add external libraries having their CDN link and types definition like jquery but don't know how to add libraries which ...
1
vote
1answer
329 views

How to attach click event for elements rendering inside map function inside

I am using SPFx to create web part. I am generating checkboxes dynamically with map function. below is render method code public render(): React.ReactElement<IQuickSurveyProps> { let styles: ...
0
votes
3answers
3k views

_spPageContextInfo.siteServerRelativeUrl is undefined

The _spPageContextInfo.siteServerRelativeUrl is undefined which i'm using to acquire information about the web parts on a page. unfortunately, the value always returns undefined. I tried using the ...
0
votes
1answer
178 views

Url to stop following a document

I'm working with TypeScript and SharePoint Framework in SharePoint Online. I know that I can see all documents I follow by typing the following url in my browser: https://[my-tenant]/_api/social....
1
vote
1answer
1k views

(spfx) 'SPHttpClientConfiguration' is not assignable to to parameter of type 'SPHttpClientConfiguration'

I've been fiddling around with this issue for some hours. Here's my dependencies: "dependencies": { "@microsoft/sp-core-library": "~1.1.0", "@microsoft/sp-http": "^0.1.2", "@microsoft/sp-...
1
vote
0answers
509 views

Typescript Angular Cannot find name [closed]

I am working on Aspnet Core Angular project and getting following error: TS2304: Cannot find name 'email'. The code is executed in visual studio 2017. postEmailValidate(email?: string): Observable&...
0
votes
0answers
150 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
1k views

TSLint Error: Argument of type 'SPHttpClientConfiguration' is not assign able to parameter of type 'SPHttpClientConfiguration'

Unable to Build my SharePoint solution. When building, each of my webparts has the error "Argument of type 'SPHttpClientConfiguration' is not assign able to parameter of type '...
3
votes
1answer
859 views

Office-UI-Fabric-react uncheck checbox

How Can I uncheck a checkbox dynamically from the code? I need to uncheck some checkboxes at the same time from the code when I press a button. I'm using: SharePoint Framework - Typescript - Office ...
0
votes
1answer
101 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 ...
2
votes
1answer
527 views

How to include office ui fabric CSS font specifications

Since I updated my SPFx webpart today to > npm update: +-- @microsoft/sp-build-web@1.2.0 +-- @microsoft/sp-core-library@1.2.0 +-- @microsoft/sp-module-interfaces@1.2.0 +-- @microsoft/sp-webpart-...
1
vote
0answers
123 views

Problem getting typescript class to work with CSR

I am trying to write a TypeScript/React class that will only get instantiated once and is accessible globally. The reason for this is a SharePoint CSR script. I load this script for New/Edit/Display ...
2
votes
0answers
56 views

Redirect to DisplayForm after Item has been saved using CSR and TypeScript

I have a problem that's really bugging me. I am trying to redirect the user to the DisplayForm once he has created a new ListItem in NewForm. I have two problems: I don't know how to get the ID of ...
0
votes
1answer
214 views

SPFx - Wrong function return current user formatted name

I'm beginner with TS and promises. I want to know Why function is returning empty string? How to format my function to return current user formatted name? The request is executed after the function ...
3
votes
1answer
366 views

SPFx - Template for Angular 2

I need to install an Angular 2 template, but when I try the GitHub templates I have mistakes. Would you give me a quality template or tutorial for Angular 2 with SPFx: Errors:
1
vote
2answers
2k views

Import SP.js to typescript (Angular 4) application and use JSOM

I would like to use JSOM for things like creating Caml queries as I have to migrate AngularJS to Angular 4. The app is running in a WebPart. Unfortunately there is no npm package for this. How can I ...
3
votes
1answer
1k views

How to enable Async/Wait in SPFx Typescript, tslint: Missing semicolon, TS1005: ',' expected, TS2304: Cannot find name 'await'

I am trying to use async / await for developing a SPFx WebPart. The sample react-async-await-sp-pnp-js in sp-dev-fx-webparts compiles and runs fine on my computer. When I try to use async / await, ...
3
votes
1answer
181 views

SharePoint 2013 : Calling function in javascript file from Ribbon button

I am trying to call a function in an external javascript file from SharePoint 2013 ribbon button. I have a Typescript file and i am using Webpack to transcompile it to javascript. When i try to call ...
1
vote
0answers
581 views

How to use Office UI Fabric Callout in SPFx WebParts?

I try to use a good pattern to use the Callout, for instance when hovering over a Persona element. Currently I do the following: _clientPersonaElement is a reference to the Element the Callout uses ...
1
vote
1answer
926 views

How to debug SPFX Web part in visual studio code ?

I am trying to find a way to debug my local SPFx workbench from Visual Studio Code, For this have installed the "skritt-debugger" and the launch.json Look Like this "configurations": [{ "...
2
votes
2answers
843 views

Getting error in $.Get in SharePoint Framework

I have created following function in webpart.ts file to retrieve stock data from the Yahoo finance, protected demo():void{ var symbol='goog'; var url = 'http://query.yahooapis.com/v1/public/...
0
votes
1answer
219 views

HTML does not render properly in SharePoint Hosted App with Angular 2

I am trying to create a very basic SharePoint Hosted App with Angular2. App deployed successfully but it does not render the html properly. And I am stuck at this initial level only. refer below ...
0
votes
2answers
382 views

SharePoint set MultiLookup field using CSR and TypeScript

I am trying to set the value of a multi lookup field. I am rendering my field using CSR and using registerGetValueCallback to get the value of my lookup field. But the value of my field does not ...
0
votes
1answer
96 views

Approach how to use typescript with sharepoint 2010

What is the best approach to work with jsom in typescript on sharepoint 2010 platform ? I founded defined types but they based on sharepoint 2013 version and I don't know how much they are compatible ...
0
votes
2answers
260 views

how to fetch document library data in SharePoint Framework, Modern UI

to build a simple web-part to display document library using SharePoint Frame Work, that using type script how to get connected to SharePoint Document Libraries?
3
votes
1answer
2k views

SharePoint Framework: how to change TypeScript version used by gulp?

I set up a new project using the yeoman template for SharePoint Framework web parts. Everything is working fine, I can run gulp serve and work in the local workbench. Good. Now I need to change the ...
1
vote
1answer
217 views

SharePoint Framework development using Visual Studio

I am going through the new development approach that is introduced in SharePoint which seems to be open source and suggested approach by Microsoft. If i look from developement perspective then it has ...
0
votes
1answer
278 views

How to easily add SharePoint Types to VS Code globally?

It is easy to add Types of CSOM to VS Code by using npm install @types/sharepoint --save in a project folder. However, is it possible to use it globally so I don't need to add it myself?
0
votes
1answer
88 views

Cross Site-Collection Add-in for Followed Items

I'm building an Add-In that is being used to display to a user their followed documents in a responsive format. For the most part, the add-in works fine. However, for certain items, in particular "...
1
vote
1answer
107 views

Object doesn't support property or method '$1Q_0' when using cascading executeQueryAsync

I have a very annoying problem. I get the above error every time I execute below code. It happens at the second executeQueryAsync call. The error callback isn't hit nor did I find anything interesting ...