Get component that matches a condition