Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add load event #145

Merged

Conversation

kbarbounakis
Copy link
Contributor

@kbarbounakis kbarbounakis commented May 12, 2024

This PR adds DataModel.load global event emitter for handling post loading process.

e.g. the following example uses DataModel.load event to force data caching for any model:

// force caching for any model
DataModel.load.subscribe((event) => {
    event.target.caching = 'always';
});
let model = context.model('Product');

@kbarbounakis kbarbounakis merged commit f036189 into themost-framework:master May 12, 2024
1 check passed
@kbarbounakis kbarbounakis deleted the use-data-model-initialize branch May 12, 2024 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant