UI logic for select