UI-Dropdown icon indicating copy to clipboard operation
UI-Dropdown copied to clipboard

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

Open rhaq2 opened this issue 8 years ago • 0 comments

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.

rhaq2 avatar Oct 17 '17 18:10 rhaq2