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

Dom validation Issue in Accordion component #375

Open
metart43 opened this issue Jul 25, 2022 · 1 comment
Open

Dom validation Issue in Accordion component #375

metart43 opened this issue Jul 25, 2022 · 1 comment
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@metart43
Copy link

metart43 commented Jul 25, 2022

Background:

  • Warning: validateDOMNesting(...): <button> cannot appear as a descendant of <button>.

Expected Behavior:

  • <button> element shouldn't be rendering another button inside of it.

  • The issue is in src/components/containers/Accordion/Accordion.js:77 where <button> should be potentially replaced with a <div>

src/components/containers/Accordion/Accordion.js:108 there is the logic that renders rawButton

  <div className="fhir-container__Accordion__data-text accordion-body ps-4 pt-3 pe-4 border-top">
    {bodyContent}
    {typeof rawOnClick === 'function' &&
      isRawInAccordion &&
      rawButton}
 </div>

Screenshots:

Screenshot 2022-07-25 at 16 59 59

@jocelynn1uphealth jocelynn1uphealth added enhancement New feature or request good first issue Good for newcomers labels Mar 24, 2023
@awatson1978
Copy link

Running into this issue with the FhirResource object also.

// imorts
import { FhirResource, fhirVersions } from 'fhir-react';

// elsewhere in file
<Card>
  <ErrorBoundary>
    <FhirResource
      fhirResource={getResourceForDynamicComponent(get(props, 'patient'), 12)}
      fhirVersion={fhirVersions.R4}
      fhirIcons="https://www.gravatar.com/avatar/?s=50&r=any&default=identicon&forcedefault=1"
      withCarinBBProfile
    />
  </ErrorBoundary>
</Card>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Development

No branches or pull requests

3 participants