-
Notifications
You must be signed in to change notification settings - Fork 74
feat: Spring Data API for Grid #7011
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
|
Very good, almost like I would have done it 😁 "Spring" alone in the naming doesn't sound quite right though. I'd at least expand that to SpringData as that is where the Pageable is located in. Couple of other drafts I tried yesterday in my IDE, but I feel like the best option is missing from the list: I'd pick this last one if other lazy methods wouldn't already drive people toward setItems, maybe still a good option 🤷♂️ |
|
|
|
It intentionally starts with |
fa8af01 to
e369386
Compare
Provides a Spring Data specific setItems variant based on Pageable. The method is called setItemsSpring because the signature is the same as existing setItems methods. Used as e.g. ``` grid.setItemsSpring(pageable -> productService.list(pageable)) ```
2826a4c to
a12e2f9
Compare
|
Not sure if we want to add some Spring ITs here or not |
|
Well not ITs, unit tests |
|
As far as I understand, the current ITs tests that it does not cause issues in non-Spring projects |
|
We would need to verify if the component is still usable without Spring before proceeding with the PR. |
|
The ITs are running without Spring as far as I know. Also simple manual tests shows it works |
sissbruecker
left a comment
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.
Optional Spring dependency seems to work well
vaadin-grid-flow-parent/vaadin-grid-flow/src/main/java/com/vaadin/flow/component/grid/Grid.java
Outdated
Show resolved
Hide resolved
vaadin-grid-flow-parent/vaadin-grid-flow/src/main/java/com/vaadin/flow/component/grid/Grid.java
Show resolved
Hide resolved
|
|
This ticket/PR has been released with Vaadin 24.7.0.alpha5 and is also targeting the upcoming stable 24.7.0 version. |



Provides a Spring Data specific setItems variant based on Pageable.
The method is called setItemsSpring because the signature is the same as existing setItems methods.
Used as e.g.