From 0b4ee5e5708fb603b9e32bd0bdd25a3d42082083 Mon Sep 17 00:00:00 2001 From: Patrick Lamber Date: Mon, 4 May 2020 18:18:01 +0200 Subject: [PATCH] Improves the method binding in the source code --- .../components/GraphConsumer.tsx | 36 +++++++++---------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/tutorials/api-scopes/src/webparts/graphConsumer/components/GraphConsumer.tsx b/tutorials/api-scopes/src/webparts/graphConsumer/components/GraphConsumer.tsx index 366882273..6cb9ee06c 100644 --- a/tutorials/api-scopes/src/webparts/graphConsumer/components/GraphConsumer.tsx +++ b/tutorials/api-scopes/src/webparts/graphConsumer/components/GraphConsumer.tsx @@ -1,22 +1,18 @@ -import * as React from 'react'; -import styles from './GraphConsumer.module.scss'; import * as strings from 'GraphConsumerWebPartStrings'; +import { + BaseButton, Button, CheckboxVisibility, DetailsList, DetailsListLayoutMode, PrimaryButton, + SelectionMode, TextField +} from 'office-ui-fabric-react'; +import * as React from 'react'; + +import { AadHttpClient, MSGraphClient } from '@microsoft/sp-http'; +import { escape } from '@microsoft/sp-lodash-subset'; + +import { ClientMode } from './ClientMode'; +import styles from './GraphConsumer.module.scss'; import { IGraphConsumerProps } from './IGraphConsumerProps'; import { IGraphConsumerState } from './IGraphConsumerState'; -import { ClientMode } from './ClientMode'; import { IUserItem } from './IUserItem'; -import { escape } from '@microsoft/sp-lodash-subset'; -import { - PrimaryButton, - TextField, - DetailsList, - DetailsListLayoutMode, - CheckboxVisibility, - SelectionMode, - BaseButton, - Button -} from 'office-ui-fabric-react'; -import { AadHttpClient, MSGraphClient } from "@microsoft/sp-http"; // Configure the columns for the DetailsList component let _usersListColumns = [ @@ -119,7 +115,7 @@ export default class GraphConsumer extends React.Component { // The search for text cannot contain spaces return (value == null || value.length == 0 || value.indexOf(" ") < 0) ? '' @@ -136,12 +132,12 @@ export default class GraphConsumer extends React.Component { // Log the current operation console.log("Using _searchWithAad() method"); @@ -189,7 +185,7 @@ export default class GraphConsumer extends React.Component { // Log the current operation console.log("Using _searchWithGraph() method");