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

Store should merge fields if both modelClass and fields configs are defined #3883

Closed
chuckn0rris opened this issue Dec 10, 2021 · 1 comment
Assignees
Labels
bug Something isn't working forum Issues from forum invalid This doesn't seem right
Milestone

Comments

@chuckn0rris
Copy link

chuckn0rris commented Dec 10, 2021

Forum post

Our docs says that store does merge fields with model's fields, but now it works only if modelClass is not provided. Should be possible to provide both

// now this won't merge fields, `fields` just ignored.
let store = new Store({
   data: [order],
   fields : [{ name: "BuyerName", type: "string", dataSource: "Buyer.Name" }],
   modelClass: Order
});
@chuckn0rris chuckn0rris added bug Something isn't working forum Issues from forum labels Dec 10, 2021
@isglass isglass added this to the 5.0.1 milestone Dec 10, 2021
@isglass isglass added in progress invalid This doesn't seem right and removed in progress labels Mar 2, 2022
@isglass
Copy link
Contributor

isglass commented Mar 2, 2022

It already merges fields, problem is that user is supplying a record and not data. Will clarify in docs

@isglass isglass closed this as completed Mar 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working forum Issues from forum invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

3 participants