[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:
Laurent Smet
2023-06-23 16:35:01 +02:00
parent c6b4f67238
commit e7cbd26b08
+3
View File
@@ -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) => {