react-autosuggest icon indicating copy to clipboard operation
react-autosuggest copied to clipboard

Warning: Each child in a list should have a unique "key" prop. Check the render method of `AutoSuggest`.

Open mahesh5b5 opened this issue 5 years ago • 5 comments

Are you reporting a bug?

Yes

  • Please create a Codepen that demonstrates your issue. You can start from the Basic example.

  • Provide the steps to reproduce the issue, e.g.:

    1. Focus on the input field
    2. Type c, and wait for suggestions to appear
    3. Press Escape

    Observed behaviour: Suggestions stay open

    Expected behaviour: Suggestions should be closed

Are you making a feature request?

  • Please describe your use case from user journey point of view, e.g.:

    In my application, when user highlights suggestions (using the mouse or keyboard), I'd like to display additional information about the highlighted suggestion alongside the Autosuggest.

  • If you have ideas how to extend the Autosuggest API to support your new feature, please share!

  • If you know any examples online that already implement such functionality, please share a link.

mahesh5b5 avatar Jun 28 '19 06:06 mahesh5b5

Please help how to resolve this issue

mahesh5b5 avatar Jun 28 '19 06:06 mahesh5b5

whenever using a map make sure to use unique keys. this should solve the issue

example:

 {parts.map((part, index) => (
            <span key={part.text+"_"+index} style={{ fontWeight: part.highlight ? 500 : 400 }}>
              {part.text}
            </span>
          ))}

masbaehr avatar Sep 05 '19 13:09 masbaehr

Has this been solved?

EloyID avatar Jan 29 '21 14:01 EloyID

yes

mahesh5b5 avatar Mar 19 '21 18:03 mahesh5b5

Hello @mahesh5b5 , if this issue is solved, can you provide the link to the PR fixing the issue please? Btw I think this issue can be solved.

ps: I reproduce something similar in 9.4.3 version.

trollepierre avatar Aug 05 '22 10:08 trollepierre