[IMP] web: Add hook 'onWillStartAfterLoad' on useModel
Allow a custom onWillStart but after the loading of the model in useModel. Task: 3193121 Part-of: odoo/odoo#119185
This commit is contained in:
@@ -145,6 +145,9 @@ export function useModel(ModelClass, params, options = {}) {
|
||||
await options.onWillStart();
|
||||
}
|
||||
await load(component.props);
|
||||
if (options.onWillStartAfterLoad) {
|
||||
await options.onWillStartAfterLoad();
|
||||
}
|
||||
started = true;
|
||||
});
|
||||
onWillUpdateProps((nextProps) => {
|
||||
|
||||
Reference in New Issue
Block a user