Skip to content

Warning when using the same value for Text as well as Description #16

Description

@rhaq2

This seems like an issue of how the keys are being generated for the options.

The following code of options that are being fed into the Dropdown should demonstrate the issue:

const options = [
            { value: 'A', description: 'A', text: 'A' },
            { value: 'B', description: 'B', text: 'B' }
];

The following warning shows up in the console:

Warning: Encountered two children with the same key, B. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions