office-ui-fabric-react#autobind TypeScript Examples

The following examples show how to use office-ui-fabric-react#autobind. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SpfxReactMaterialui.tsx    From SPFx with Mozilla Public License 2.0 6 votes vote down vote up
@autobind
  private async saveinfo() {
    const iar: IItemAddResult = await sp.web.lists.getByTitle("People").items.add({
      Title: this.state.firstname,
      LastName: this.state.lastname,
      Premiumplan: this.state.premiumplan,
      Age: this.state.age,
      Gender: this.state.gender
    });
  }
Example #2
Source File: SpfxReactRichtext.tsx    From SPFx with Mozilla Public License 2.0 6 votes vote down vote up
@autobind
  private async _SaveIntoSP() {
    let list = sp.web.lists.getByTitle("ReactRichText");
    const i = await list.items.getById(1).update({
      Title: this.state.title,
      ReactRichText: this.state.reactrichtext,
      Place: this.state.place
    });
  }
Example #3
Source File: SpfxReactSelect.tsx    From SPFx with Mozilla Public License 2.0 6 votes vote down vote up
@autobind
  private async _savevalues() {
    let res: string[] = [];
    this.state.selectedvalues.forEach(function (va, i) {
      res.push(va.value);
    });
    let list = sp.web.lists.getByTitle("Sales");
    const i = await list.items.getById(1).update({
      Country: this.state.selectedvalue.value,
      Countries: { results: res }
    });
  }