Function to update the list of selected items on change
final Function(List<ValueItem<T>>) updateSelectedItems;