Class ComboBoxDataCommunicator.SelectionPreservingKeyMapper<TItem>

java.lang.Object
com.vaadin.flow.data.provider.KeyMapper<TItem>
com.vaadin.flow.component.combobox.ComboBoxDataCommunicator.SelectionPreservingKeyMapper<TItem>
Type Parameters:
TItem - The type of the item selectable in the combo box
All Implemented Interfaces:
com.vaadin.flow.data.provider.DataKeyMapper<TItem>, Serializable
Enclosing class:
ComboBoxDataCommunicator<TItem>

protected static class ComboBoxDataCommunicator.SelectionPreservingKeyMapper<TItem> extends com.vaadin.flow.data.provider.KeyMapper<TItem>
Customized key mapper that does not remove key for an item as long as it is selected.
See Also:
  • Constructor Details

    • SelectionPreservingKeyMapper

      public SelectionPreservingKeyMapper(ComboBoxBase<?,TItem,?> comboBox)
  • Method Details

    • remove

      public void remove(TItem item)
      Specified by:
      remove in interface com.vaadin.flow.data.provider.DataKeyMapper<TItem>
      Overrides:
      remove in class com.vaadin.flow.data.provider.KeyMapper<TItem>
    • key

      public String key(TItem item)
      Specified by:
      key in interface com.vaadin.flow.data.provider.DataKeyMapper<TItem>
      Overrides:
      key in class com.vaadin.flow.data.provider.KeyMapper<TItem>
    • purgeItems

      public void purgeItems()