From fa457877f45abb692369addab76d579d5d31539d Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Wed, 2 Jun 2021 13:25:50 +0400 Subject: [PATCH] SuggestionsList: Try to use a unique "key" (#32344) --- .../components/src/form-token-field/suggestions-list.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/components/src/form-token-field/suggestions-list.js b/packages/components/src/form-token-field/suggestions-list.js index af8a2141352abc..0f8b44c4068a0e 100644 --- a/packages/components/src/form-token-field/suggestions-list.js +++ b/packages/components/src/form-token-field/suggestions-list.js @@ -110,7 +110,11 @@ class SuggestionsList extends Component { id={ `components-form-token-suggestions-${ this.props.instanceId }-${ index }` } role="option" className={ classeName } - key={ this.props.displayTransform( suggestion ) } + key={ + suggestion?.value + ? suggestion.value + : this.props.displayTransform( suggestion ) + } onMouseDown={ this.handleMouseDown } onClick={ this.handleClick( suggestion ) } onMouseEnter={ this.handleHover( suggestion ) }