Commit Graph
3 Commits
Author SHA1 Message Date
Joseph Caburnay 2c383aae48 [IMP] web: custom_hooks: useListener able to pass options to addEventListener
addEventListener supports an `options` argument, which can
be useful to listen on events during the capture phase

This commit allows to pass these options to the hook useListener

closes odoo/odoo#45478

Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
2020-02-20 12:33:54 +00:00
Lucas Perais (lpe) 6bdcf054fd [IMP] web: custom_hooks: dynamic inheritable event handling
This commit's intention is to bring class inheritance of event handlers
to components.
Use case:
A component class may want to set generic event handlers for all classes
inheriting from it, in order to set shared event behavior from the start
It is the case in many parts of Odoo, in particular in the cases of fields
which need at least to react on some keyboard event for navigation

The way to implement such a behavior is to make use of the
`useListener` OWL hook, by passing as arguments
event name and the handler function
2020-02-03 09:15:02 +00:00
29726e8fd0 [ADD] web: add owl 1.0.0-beta1 to odoo
With this commit, we properly introduce the Owl library into our beloved
codebase. More information on the Owl library can be found in the project
repository: https://github.com/odoo/owl/

Co-authored-by: Aaron Bohy <aab@odoo.com>
Co-authored-by: Julien Mougenot <jum@odoo.com>
Co-authored-by: Mathieu Duckerts-Antoine <dam@odoo.com>
2019-12-09 11:09:10 +00:00