question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Select considering value instead of key

See original GitHub issue

Version

3.2.0

Environment

win10, chrome 64

Reproduction link

https://codesandbox.io/s/k2qmqnxrzv

Steps to reproduce

Select with many options where the key is a uuid and value is a number but with repeated values.

What is expected?

No errors

What is actually happening?

Error in console : Warning: Encountered two children with the same key, .$1. 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. in ul (created by DOMWrap) in DOMWrap (created by Menu) in Menu (created by DropdownMenu) in div (created by DropdownMenu) in DropdownMenu (created by SelectTrigger) in LazyRenderBox (created by PopupInner) in div (created by PopupInner) in PopupInner (created by Popup) in Align (created by Popup) in AnimateChild (created by Animate) in Animate (created by Popup) in div (created by Popup) in Popup (created by Trigger) in Portal (created by Trigger) in Trigger (created by SelectTrigger) in SelectTrigger (created by Select) in Select (created by LocaleReceiver) in LocaleReceiver (created by Select) in Select (created by TestSelect) in div (created by TestSelect) in TestSelect in div


If the key is always different, the value in the option should not interfer with the react key (because it is not even mandatory, only the key is). Sorry if i’m missing something and thank you!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:14 (9 by maintainers)

github_iconTop GitHub Comments

26reactions
yesmeckcommented, Feb 8, 2018

And value should be unique.

18reactions
mikexfreezecommented, Oct 25, 2018

@yesmeck 不是一两个人提这种需求了,其他框架中的select 也没有像这么玩的。你们团队应该好好讨论一下

Read more comments on GitHub >

github_iconTop Results From Across the Web

Warning: Use the 'defaultValue' or 'value' props on <select ...
I used "value" attribute on select instead of defaultValue and as you said I kept the value of "value" attribute for option and...
Read more >
NoSQL database types explained: Key-value store - TechTarget
Read about the benefits of a key-value store -- a simple NoSQL database used to store, retrieve and remove data.
Read more >
How to Select the Right Data Types | Tutorial by Chartio
A key factor in determining the size of your data is the data type you select. This tutorial will explain how to select...
Read more >
Create a simple select query - Microsoft Support
When you want to select specific data from one or more sources, you can use a select query. A select query helps you...
Read more >
Choosing the Right DynamoDB Partition Key - Amazon AWS
This blog post covers important considerations and strategies for choosing the right partition key for designing a schema that uses Amazon ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found