summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic/basic_model.js
diff options
context:
space:
mode:
authorGéry Debongnie <ged@odoo.com>2017-03-28 15:58:03 +0200
committerAaron Bohy <aab@odoo.com>2017-04-11 19:44:38 +0200
commitc43a3a5045945658add54a220c02cf0f23c03833 (patch)
tree38dabba7483f517e62631c3bb58c373ad1429ca9 /addons/web/static/src/js/views/basic/basic_model.js
parent07f5ac3dabd09dafca261ee596015a50c061a8f8 (diff)
[FIX] web: debounce field changes for input fields
Before this commit, every field changes were sent upstream and triggered a notifyChange, potentially causing multiple (onchanges) RPCS in rapid succession. It is useful to have a feedback of the new values of the fields even without needing to lose the focus, but it should not be done for each keystroke. With this commit, we debounce the onInput handler, so the method setValue is in practice debounced as well. We need to add a handler on the focusout event to make sure that if the user changes input, the setValue is immediately called. Note that we had to add support for that in the test utils environment (and not only in the createView method: field widgets can be instantiated in other environment, such as the reconciliation widget)
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_model.js')
0 files changed, 0 insertions, 0 deletions