cretueusebiu / vform

Handle Laravel-Vue forms and validation with ease.
https://vform.vercel.app
MIT License
610 stars 122 forks source link

Dirty form feature #102

Closed jariesdev closed 3 years ago

jariesdev commented 4 years ago

Hi thank you for making our life easy!

anyway, I would like to ask if possible to check if the form has change since initial value set?

robjuz commented 4 years ago

I'm open for better solutions

import {isEqual} from 'lodash';

  computed: {
    dirty() {
      return !isEqual(this.form.data(), this.form.originalData);
    }
  },