Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use tree selector to select project #174

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

DiamondYuan
Copy link
Contributor

@DiamondYuan DiamondYuan commented Nov 19, 2024

close #166

}
// eslint-disable-next-line no-loop-func
const parentProject = allProjects.find((p) => p.id === current)
current = parentProject?.parentProjectId
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we just simply do this?

                current = projectsMap[current].parentProjectId

class ProjectSelector extends React.Component<ProjectSelectorProps> {
render() {
const { allProjects, selectedProjectId, onChange, excludeProjectId } =
this.props
const { allProjects, selectedProjectId, onChange } = this.props
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not extract excludeProjectId here as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

There is no way to differentiate folders with the same name
2 participants