aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/Form.ts
diff options
context:
space:
mode:
authorLibravatar Markus Hatvan <markus_hatvan@aon.at>2021-10-02 09:24:32 +0200
committerLibravatar GitHub <noreply@github.com>2021-10-02 09:24:32 +0200
commitbfe8847d72cd0893230f2e654242658214943e61 (patch)
tree3384b02ebad7a74cbb106ddd95546e0e24ff0bb8 /src/lib/Form.ts
parentfix: Fix navigation shortcut accelerator for non-macos (fixes #1172) (#2012) (diff)
downloadferdium-app-bfe8847d72cd0893230f2e654242658214943e61.tar.gz
ferdium-app-bfe8847d72cd0893230f2e654242658214943e61.tar.zst
ferdium-app-bfe8847d72cd0893230f2e654242658214943e61.zip
chore: convert various files from JS to TS (#2010)
Diffstat (limited to 'src/lib/Form.ts')
-rw-r--r--src/lib/Form.ts32
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 @@
1import Form from 'mobx-react-form';
2
3export 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}