Extract selection code to SelectableMixin