Skip to content

Commit

Permalink
fix(graph): fix empty target group (#26704)
Browse files Browse the repository at this point in the history
<!-- Please make sure you have read the submission guidelines before
posting an PR -->
<!--
https://github.com/nrwl/nx/blob/master/CONTRIBUTING.md#-submitting-a-pr
-->

<!-- Please make sure that your commit message follows our format -->
<!-- Example: `fix(nx): must begin with lowercase` -->

<!-- If this is a particularly complex change or feature addition, you
can request a dedicated Nx release for this pull request branch. Mention
someone from the Nx team or the `@nrwl/nx-pipelines-reviewers` and they
will confirm if the PR warrants its own release for testing purposes,
and generate it for you if appropriate. -->

## Current Behavior
<!-- This is the behavior we have today -->
![Screenshot 2024-06-26 at 2 56
04 PM](https://github.com/nrwl/nx/assets/16211801/d9cc93db-06a2-4c30-b88a-3054edfb619a)

when the others group are empty, it shows the container.
move the check to
graph/ui-project-details/src/lib/target-configuration-details-group-container/target-configuration-details-group-container.tsx.

## Expected Behavior
<!-- This is the behavior we should expect with the changes in this PR
-->

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #
  • Loading branch information
xiongemi authored Jun 27, 2024
1 parent 4197a91 commit 5e02295
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ export function TargetConfigurationGroupContainer({
nxConnectCallback,
children,
}: TargetConfigurationGroupContainerProps) {
if (targetsNumber === 0) {
return null;
}
return (
<div className="mb-4 w-full">
<TargetConfigurationGroupHeader
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ export function TargetConfigurationGroupList({
<>
{Object.entries(targetsGroup.groups).map(
([targetGroupName, targets]) => {
if (targets.length === 0) {
return null;
}
return (
<TargetConfigurationGroupContainer
targetGroupName={targetGroupName}
Expand Down

0 comments on commit 5e02295

Please sign in to comment.