diff options
| author | Aaron Bohy <aab@odoo.com> | 2017-04-06 14:40:00 +0200 |
|---|---|---|
| committer | Aaron Bohy <aab@odoo.com> | 2017-04-11 19:44:38 +0200 |
| commit | 942d5fc4a3c4f9c4e4b9ec3cc955f77d47b6aac3 (patch) | |
| tree | 58454e4e6141570957ce868fb5bcfa0d739e3ea8 /addons/web/static/src/js/fields/basic_fields.js | |
| parent | 64e0fe80a37d8ddc70fe76daa732a77ace27c5a0 (diff) | |
[REF] web: Fields: DEBOUNCE is a DebouncedField attribute
Diffstat (limited to 'addons/web/static/src/js/fields/basic_fields.js')
| -rw-r--r-- | addons/web/static/src/js/fields/basic_fields.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/addons/web/static/src/js/fields/basic_fields.js b/addons/web/static/src/js/fields/basic_fields.js index a8d026fc8ec..4eb13eb0ec5 100644 --- a/addons/web/static/src/js/fields/basic_fields.js +++ b/addons/web/static/src/js/fields/basic_fields.js @@ -31,6 +31,12 @@ var DebouncedField = AbstractField.extend({ 'input': '_onInput', 'change': '_onChange', }), + /** + * for field widgets that may have a large number of field changes quickly, + * it could be a good idea to debounce the changes. In that case, this is + * the suggested value. + */ + DEBOUNCE: 1000, /** * Override init to debounce the input changes to make sure they are not @@ -2044,6 +2050,7 @@ var AceEditor = AbstractField.extend({ }); return { + DebouncedField: DebouncedField, EmailWidget: EmailWidget, FieldBinaryFile: FieldBinaryFile, FieldBinaryImage: FieldBinaryImage, |
