Witify/formly

View on GitHub
src/services/FormSuccess.js

Summary

Maintainability
A
0 mins
Test Coverage
import store from '../store'
import config from '../utils/config'

class FormSuccess {

  constructor(form) {
    this.form = form
  }

  /**
   * Handles a form success
   */
  handle(response) {

    // Set form as "not mutated"
    store.setMutated(false)

    // Call custom handler
    config.onFormSuccess(response)
  }
}

export { FormSuccess }