Hi all,
I currently have a DataView containing several DataItems that are created based on the store I pass it upon a user logging in.
However, I'd like to try to use the data config to list all of the possible DataItems and then still pass the store to have the user's items override the default ones.
Example:
Code:
...DataView {
data: [
{
name: 'item1',
image: 'image-unavailable.png'
},
{
name: 'item2',
image: 'image-unavailable.png'
}
]
}
Store content:
Code:
[
{
name: 'item1',
image: 'item-available.png'
}
]
In the case above, item2 would be shown as unavailable and item1 would be shown as available (since the store would override the data config). Unfortunately, attempting to use the data config and a store throws an error. Aside from using another entire store containing all the defaults and then creating a third (temporary) store combining the user store and the defaults store, is there any way I can accomplish this task?
Thanks!
P.S. I can post actual code snippets if needed, but the code above should serve as a pretty good demonstration.