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

(fix): Missing default values for nested components #945

Merged
merged 1 commit into from
Nov 21, 2024

Conversation

JayaKrishnaNamburu
Copy link
Member

This PR fixes a bug, when there are nested components passing multiple props. HTML misses some of them if they are referring to the same one.

Current Behaviour

<body>
    <link rel="stylesheet" href="../style.css" />
    <div>
      <link href="./first-level.css" rel="stylesheet" />
      <div class="first-level-container first-level">
        <second-level-wrapper
          class="second-level-wrapper"
          rootclassname="second-levelundefined"
        >
          <!--SecondLevel component-->
          <div class="second-levelroot-class-name">
            <button type="button" class="button">
              <span>
                <span><!--Content for slot label--></span>
              </span>
            </button>
          </div>
        </second-level-wrapper>
      </div>
    </div>
  </body>

After fixing

<body>
    <link rel="stylesheet" href="../style.css" />
    <div>
      <link href="./first-level.css" rel="stylesheet" />
      <div class="first-level-container first-level">
        <second-level-wrapper
          class="second-level-wrapper"
          rootclassname="second-levelundefined"
        >
          <!--SecondLevel component-->
          <div class="second-levelroot-class-name">
            <button type="button" class="button">
              <span>
                <fragment class="second-level-fragment">
                  <span>Button</span>
                </fragment>
              </span>
            </button>
          </div>
        </second-level-wrapper>
      </div>
    </div>
  </body>

You can see the default value for the node inside the SecondLevel component is missing. This is fixed now in this PR.

nested-components.json

@vladgrecu vladgrecu self-requested a review November 21, 2024 07:42
@JayaKrishnaNamburu JayaKrishnaNamburu merged commit 10518d3 into development Nov 21, 2024
2 checks passed
@JayaKrishnaNamburu JayaKrishnaNamburu deleted the fix-missing-props branch November 21, 2024 13:25
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.

2 participants