tailwindlabs / headlessui

Completely unstyled, fully accessible UI components, designed to integrate beautifully with Tailwind CSS.

Home Page:https://headlessui.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[DOCS]: vue docs basic-example ComboboxOption key person.id is undefined

RuSenLi opened this issue · comments

commented

https://headlessui.com/vue/combobox#basic-example
In the example, people doesn't have an id, I suggest changing :key="person.id" to :key="person".

<template>
  <ComboboxOption
    v-for="person in filteredPeople"
    :key="person.id"
    :value="person"
  >
    {{ person }}
  </ComboboxOption>
</template>

<script setup>
  const people = [
    'Durward Reynolds',
    'Kenton Towne',
    'Therese Wunsch',
    'Benedict Kessler',
    'Katelyn Rohan',
  ]
</script>

Hey!

Nice catch, this should be fixed and will be live shortly. Thanks!