allow selection by id and preselection

Cache selectedId in case list is not yet finished loading