Sets the selection callback.
set onSelected(void Function(List<T> items, List<K> keys)? callback) { _onSelected = callback; }