You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I recall correctly, <ma-data> loads data immediately. I was thinking of some use cases where it might be undesirable.
For example, suppose our data is private, and the user needs to log in to access it. So there is no need to fire load() after the component is mounted (or at some point after the page loads), only after the user logs in. But since we automatically load data after the user logs in, it perfectly suits this use case.
Another use case is if we need to use one backend as a source and another as storage. E.g., we want to copy data from one backend to another. So, it would be nice if we could prevent data loading from the storage backend.
If we decide to implement this feature, I wonder if it'll be a separate attribute or if we can follow the Vue API and have something like: <ma-data src.prevent="url"></ma-data>?
What do you think?
The text was updated successfully, but these errors were encountered:
I don't think .prevent would be a good idea, as it's only ever used with event handlers.
Maybe a load attribute with values auto (default), manual, authenticated? That would also allow for future extensions to how data is loaded.
If I recall correctly,
<ma-data>
loads data immediately. I was thinking of some use cases where it might be undesirable.For example, suppose our data is private, and the user needs to log in to access it. So there is no need to fire
load()
after the component is mounted (or at some point after the page loads), only after the user logs in. But since we automatically load data after the user logs in, it perfectly suits this use case.Another use case is if we need to use one backend as a source and another as storage. E.g., we want to copy data from one backend to another. So, it would be nice if we could prevent data loading from the storage backend.
If we decide to implement this feature, I wonder if it'll be a separate attribute or if we can follow the Vue API and have something like:
<ma-data src.prevent="url"></ma-data>
?What do you think?
The text was updated successfully, but these errors were encountered: