-
Notifications
You must be signed in to change notification settings - Fork 87
refactor: move the array data provider logic to a separate module #1976
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
Conversation
f669e31 to
e3f2414
Compare
c8153cf to
713f230
Compare
4cb44f3 to
004f112
Compare
| it('should not override custom data provider', () => { | ||
| it('should override custom data provider', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed internally that setting grid.items = people is basically a shorthand for setting grid.dataProvider = createArrayDataProvider(people) so setting items should actually override any existing dataProvider
Co-authored-by: Sergey Vinogradov <[email protected]>
Co-authored-by: Sergey Vinogradov <[email protected]>
Co-authored-by: Sergey Vinogradov <[email protected]>
cc324e3 to
60220b3
Compare
Co-authored-by: Sergey Vinogradov <[email protected]>
|
Kudos, SonarCloud Quality Gate passed!
|
The current
vaadin-grid-array-data-provider-mixin.js, at the end of the day, is just one opinionateddataProviderimplementation. Having the array data provider's codebase mixed in into the GridElement class isn't ideal since it adds unnecessary complexity to the component and makes it difficult to add enhancements related to the array data provider logic (see #1563 for more background).This internal refactor moves the array data provider to an external module (
arrayDataProvider.js) which may later be enhanced as a public feature as suggested in #1563.