Skip to content

Commit

Permalink
Add getter for presentationProvider in Grid.Column (#10323) (#12060)
Browse files Browse the repository at this point in the history
Without access to the presentation provider used for a column, it is often not possible to reconstruct the data as shown on the end-user's screen

This commit adds a getter method to Grid.Column to allow access to this provider
  • Loading branch information
jdewaen committed Dec 18, 2020
1 parent c8e04dc commit a250bde
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions server/src/main/java/com/vaadin/ui/Grid.java
Original file line number Diff line number Diff line change
Expand Up @@ -1261,6 +1261,18 @@ public ValueProvider<T, V> getValueProvider() {
return valueProvider;
}

/**
* Gets the function to get presentations from the value of data in this
* column, based on the row item.
*
* @return the presentation provider function
*
* @since
*/
public ValueProvider<V, ?> getPresentationProvider() {
return presentationProvider;
}

/**
* Sets whether the user can sort this column or not. Whether the column
* is actually sortable after {@code setSortable(true)} depends on the
Expand Down

0 comments on commit a250bde

Please sign in to comment.