refactored EntitySelector to avoid inline callbacks

`onInput` still contains one though - we'll tackle that separately