Skip to content
Snippets Groups Projects
Commit 2b4f6775 authored by Erwan Rouchet's avatar Erwan Rouchet Committed by Bastien Abadie
Browse files

Use unique keys in suggestion v-for

parent b7d471eb
No related branches found
No related tags found
1 merge request!1030Use unique keys in suggestion v-for
......@@ -18,9 +18,14 @@
<a class="dropdown-item" v-if="isLoading">
<em>Loading…</em>
</a>
<!--
The displayed suggestion string is not unique, and the keys can be anything,
not just strings, so we just use JSON to ensure all keys are strings
to avoid VUe warnings about duplicate keys in v-for.
-->
<a
v-for="[key, suggestion] in filteredSuggestions"
:key="suggestion"
:key="JSON.stringify(key)"
v-on:click.stop="select(key, true)"
:title="suggestion"
:class="{ 'selected': key === current }"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment