FlowingCode / TwinColGridAddon

TwinColGrid Vaadin Add-on
https://www.flowingcode.com/en/open-source/
Apache License 2.0
7 stars 7 forks source link

Assigning column key. #95

Closed corbettcode closed 2 years ago

corbettcode commented 2 years ago

public TwinColGrid addSortableColumn( final ItemLabelGenerator itemLabelGenerator, Comparator comparator, final String header, final String key)

assign the a column key, however

public TwinColGrid addSortableColumn( final ItemLabelGenerator itemLabelGenerator, Comparator comparator, final String header)

public TwinColGrid addFilterableColumn( final ItemLabelGenerator itemLabelGenerator, SerializableFunction<T, String> filterableValue, final String header, String filterPlaceholder, boolean enableClearButton)

public TwinColGrid addFilterableColumn( final ItemLabelGenerator itemLabelGenerator, final String header, String filterPlaceholder, boolean enableClearButton)

does not.

javier-godoy commented 2 years ago

As a temporary solution we can add the following methods:

public TwinColGrid addFilterableColumn(
ItemLabelGenerator itemLabelGenerator,
SerializableFunction<T, String> filterableValue,
String header,
String filterPlaceholder,
boolean enableClearButton,
String key)

public TwinColGrid addFilterableColumn(
ItemLabelGenerator itemLabelGenerator,
String header,
String filterPlaceholder,
boolean enableClearButton,
String key)

(The other one is just addSortableColumn(ItemLabelGenerator,Comparator,String header,String key) without the key).

That's easy to do and doesn't require an elaborate discussion. However, we should revisit the need of such methods as part of a comprehensive refactoring (#34).

javier-godoy commented 2 years ago

Released in v2.7.0