blob: 6c84f195222b7282eb9cddbaa7065d0458207446 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
odoo.define('mail/static/src/component_hooks/use_refs/use_refs.js', function (require) {
'use strict';
const { Component } = owl;
/**
* This hook provides support for dynamic-refs.
*
* @returns {function} returns object whose keys are t-ref values of active refs.
* and values are refs.
*/
function useRefs() {
const component = Component.current;
return function () {
return component.__owl__.refs || {};
};
}
return useRefs;
});
|