Skip to content

Commit

Permalink
Merge pull request #811 from AriGunawan/patch-1
Browse files Browse the repository at this point in the history
Update Progress.md
  • Loading branch information
AJIXuMuK authored Mar 2, 2021
2 parents 6469760 + 5d0c5ba commit 852ba33
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
![SharePoint Patterns and Practices](https://devofficecdn.azureedge.net/media/Default/PnP/sppnp.png)

# SharePoint Framework React Controls

This is a open source library that shares a set of reusable React control that can be used in your SharePoint Framework solutions.
Expand Down
8 changes: 4 additions & 4 deletions docs/documentation/docs/controls/Progress.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ Now, in a component, where `Progress` is used you can have code as below:

```TypeScript
export interface IYourComponentState {
actions: IProgressAction[];
currentActionIndex?: number;
progressActions: IProgressAction[];
currentProgressActionIndex?: number;
// other state properties
}

Expand All @@ -75,7 +75,7 @@ export class YourComponent extends React.Component<IYourComponentProps, IYourCom

private _initActions() {
this.setState({
actions: [
progressActions: [
new FirstAction(),
new SecondAction()
]
Expand All @@ -84,7 +84,7 @@ export class YourComponent extends React.Component<IYourComponentProps, IYourCom

private async _execute() {
for (let i = 0; i <= this.state.actions.length; i++) {
this.setState(currentActionIndex: i);
this.setState(currentProgressActionIndex: i);

if (i < this.state.actions.length) {
await this.state.actions[i].execute();
Expand Down

0 comments on commit 852ba33

Please sign in to comment.