From bfe8847d72cd0893230f2e654242658214943e61 Mon Sep 17 00:00:00 2001 From: Markus Hatvan Date: Sat, 2 Oct 2021 09:24:32 +0200 Subject: chore: convert various files from JS to TS (#2010) --- src/lib/Form.ts | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/lib/Form.ts (limited to 'src/lib/Form.ts') 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 @@ +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, + // // }, + }; + } +} -- cgit v1.2.3-54-g00ecf