diff options
Diffstat (limited to 'src/lib/Form.ts')
-rw-r--r-- | src/lib/Form.ts | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/lib/Form.ts b/src/lib/Form.ts new file mode 100644 index 000000000..9b8321948 --- /dev/null +++ b/src/lib/Form.ts | |||
@@ -0,0 +1,32 @@ | |||
1 | import Form from 'mobx-react-form'; | ||
2 | |||
3 | export default class DefaultForm extends Form { | ||
4 | bindings() { | ||
5 | return { | ||
6 | default: { | ||
7 | id: 'id', | ||
8 | name: 'name', | ||
9 | type: 'type', | ||
10 | value: 'value', | ||
11 | label: 'label', | ||
12 | placeholder: 'placeholder', | ||
13 | disabled: 'disabled', | ||
14 | onChange: 'onChange', | ||
15 | onFocus: 'onFocus', | ||
16 | onBlur: 'onBlur', | ||
17 | error: 'error', | ||
18 | }, | ||
19 | }; | ||
20 | } | ||
21 | |||
22 | options() { | ||
23 | return { | ||
24 | validateOnInit: false, // default: true | ||
25 | // validateOnBlur: true, // default: true | ||
26 | // validateOnChange: true // default: false | ||
27 | // // validationDebounceWait: { | ||
28 | // // trailing: true, | ||
29 | // // }, | ||
30 | }; | ||
31 | } | ||
32 | } | ||