Skip to content

EuiCodeBlock doesn't re-render when children prop changes. #2322

@stacey-gammon

Description

@stacey-gammon

I have a component which uses:

            <EuiCodeBlock
              language="json"
              fontSize="m"
              paddingSize="m"
              color="dark"
              overflowHeight={300}
            >
              data.search(
              {argsString}
              );
            </EuiCodeBlock>

But when argString changes (confirmed via a console.log statement), the component still shows the original string from the first render.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions