aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/Form.ts
blob: 9b832194829a5ed15c23feaf36751243a3d77426 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import Form from 'mobx-react-form';

export default class DefaultForm extends Form {
  bindings() {
    return {
      default: {
        id: 'id',
        name: 'name',
        type: 'type',
        value: 'value',
        label: 'label',
        placeholder: 'placeholder',
        disabled: 'disabled',
        onChange: 'onChange',
        onFocus: 'onFocus',
        onBlur: 'onBlur',
        error: 'error',
      },
    };
  }

  options() {
    return {
      validateOnInit: false, // default: true
      // validateOnBlur: true, // default: true
      // validateOnChange: true // default: false
      // // validationDebounceWait: {
      // //   trailing: true,
      // // },
    };
  }
}