-
Couldn't load subscription status.
- Fork 72
fix: Grid column respects custom reversed comparator and improves serialization (#3926) #8088
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
base: main
Are you sure you want to change the base?
Conversation
…ialization (#3926) - Store the original Comparator object instead of just method references - Preserve SerializableComparator instances when provided - Respect custom reversed() implementations for descending sort - Fix serialization issues when non-serializable comparators are used The column now stores the full comparator object, allowing it to: 1. Use custom reversed() implementations when sorting descending 2. Preserve serialization capability when SerializableComparator is provided 3. Only create method references as a fallback for non-serializable comparators Fixes #3926 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
|
The API seems to be a lie as there is |
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.
It looks like the change breaks serialization:
java.lang.RuntimeException: serializeAndDeserializeUi_noExceptionIsThrown[any_Chrome_](com.vaadin.flow.component.grid.it.GridLitRendererSerializationIT)
Fixes issue where Grid ignored custom reversed() implementations when sorting columns in descending order. Now stores both the comparator and its reversed version at assignment time, preserving custom reverse logic (e.g., for "favorites" that stay on top regardless of direction). Fixes #3926 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
|
|
|



The column now stores the full comparator object, allowing it to:
Fixes #3926