diff options
| author | Mohammed Shekha <msh@odoo.com> | 2020-04-28 08:05:55 +0000 |
|---|---|---|
| committer | Hiral Bhavsar <hbh@odoo.com> | 2020-07-22 10:40:14 +0000 |
| commit | e5ef19b730143321d6c9902a241aa8bf29b546fd (patch) | |
| tree | d63c5382c7f0a731a8b4916684fcd190dad6d448 | |
| parent | d8284d84bc4f9161b16a0f01a84e640cbcfb7ef2 (diff) | |
[IMP] web: improve explanatory comment in owl_compatibility
after this commit, to update legacy widget from owl component,
one need to override renderWidget and updateWidget instead of
render and update method, this has been changed from commit
https://github.com/odoo/odoo/commit/f2de55322e4d417815e6757517163dd0cff544cc
but comment were still has render and update method to override,
so with this commit update comments as well.
task-2238551
closes odoo/odoo#54763
X-original-commit: 16713aaacbd4f4a25bed435bfa9045fab29a8c53
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
| -rw-r--r-- | addons/web/static/src/js/owl_compatibility.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/addons/web/static/src/js/owl_compatibility.js b/addons/web/static/src/js/owl_compatibility.js index 103c62dd3ba..b5ff2a026d1 100644 --- a/addons/web/static/src/js/owl_compatibility.js +++ b/addons/web/static/src/js/owl_compatibility.js @@ -56,18 +56,18 @@ odoo.define('web.OwlCompatibility', function () { * <SpecificAdapter Component="LegacyWidget" firstArg="a" secondArg="b"/> * * If the legacy widget has to be updated when props change, one must define - * a subclass of ComponentAdapter to override 'update' and 'render'. The - * 'update' function takes the nextProps as argument, and should update the + * a subclass of ComponentAdapter to override 'updateWidget' and 'renderWidget'. The + * 'updateWidget' function takes the nextProps as argument, and should update the * internal state of the widget (might be async, and return a Promise). * However, to ensure that the DOM is updated all at once, it shouldn't do - * a re-rendering. This is the role of function 'render', which will be + * a re-rendering. This is the role of function 'renderWidget', which will be * called just before patching the DOM, and which thus must be synchronous. * For instance: * class SpecificAdapter extends ComponentAdapter { - * update(nextProps) { + * updateWidget(nextProps) { * return this.widget.updateState(nextProps); * } - * render() { + * renderWidget() { * return this.widget.render(); * } * } |
