Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-62156

Unique "key" prop warning in the UserPreferencePage

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • 4.21.0
    • 4.21.0
    • Management Console
    • None
    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Description of problem:

      Unique "key" prop warning in the UserPreferencePage.

      Problem: 
      The `userPreferenceTabs` property is wrapped in React fragment, which leads to React unable to properly track the key props of the individual `Tab` elements, causing keys warnings.

      ```
      Warning: Each child in a list should have a unique "key" prop.

            Check the render method of `Tabs`. See https://reactjs.org/link/warning-keys for more information.

                at Tabs (/Users/<username>/Documents/projects/console/frontend/node_modules/@patternfly/react-core/dist/js/components/Tabs/Tabs.js:30:9)
      ```

                at div

                at div

                at div

                at PageBody (/Users/cajieh/Documents/projects/console/frontend/node_modules/@patternfly/react-core/dist/js/components/Page/PageBody.js:9:11)

          

      Version-Release number of selected component (if applicable):

          

      How reproducible:

          

      Steps to Reproduce:

          1. Run "yarn test packages/console-app/src/components/user-preferences/__tests__/UserPreferencesPage.spec.tsx"
           2.
          3.
          

      Actual results:

          

      Expected results:

          

      Additional info:

          

              jhadvig@redhat.com Jakub Hadvig
              cajieh Cyril Ajieh
              None
              None
              Yanping Zhang Yanping Zhang
              None
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: