0

Any react-specific solution to the problem, described here?

https://stackoverflow.com/questions/46072489/how-to-avoid-delay-on-element-input-type-file-onchange-event?noredirect=1&lq=1

Basically the event fires with several seconds delay, so the behavior is the same as the one, described in the link: my onChange function shows a loader once the onChange method is entered but for several seconds the UI acts like nothing is happening at this moment.

0

You may need share how you did as I can't reproduce.

handleChange(selectorFiles: FileList)
  {
      alert(selectorFiles);
  }
  public render(): React.ReactElement<ITestSpFxProps> {
    var modalStyles = {overlay: {zIndex: 9999}};
    return (
      <div className={ styles.testSpFx }>
        <div className={ this.GetCss(this.props.CSSOption) }>
          {this.props.CSSOption}
          <div className={ styles.row }>

          <button onClick={this.openModal}>Open Modal</button>
          <input type="file" onChange={ (e) => this.handleChange(e.target.files) } />
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.