nuxt / ui

A UI Library for Modern Web Apps, powered by Vue & Tailwind CSS.

Home Page:https://ui.nuxt.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

USelectMenu: adding `multiple` prop throws error

larrasu opened this issue · comments

Environment

  • Operating System: Windows_NT
  • Node Version: v20.10.0
  • Nuxt Version: 3.11.2
  • CLI Version: 3.11.1
  • Nitro Version: 2.9.6
  • Package Manager: pnpm@8.15.6
  • Builder: -
  • User Config: runtimeConfig, modules, ui, supabase
  • Runtime Modules: @nuxt/eslint@0.3.10, @nuxt/content@2.12.1, @nuxt/ui@2.16.0, @nuxt/fonts@0.7.0, @nuxtjs/supabase@1.2.2, @pinia/nuxt@0.5.1, @formkit/auto-animate/nuxt@0.8.2
  • Build Modules: -

Version

v2.16.0

Reproduction

https://stackblitz.com/edit/nuxt-ui-w4c5fb?file=app.vue

Description

When adding the multiple prop to USelectMenu, it throws an error. Please see the error in the Logs section.

Additional context

No response

Logs

Uncaught (in promise) TypeError: j(...).some is not a function
    at 1 (combobox.js?v=b7f67d16:1:10154)
    at u (match.js?v=b7f67d16:1:72)
    at Object.isSelected (combobox.js?v=b7f67d16:1:10077)
    at combobox.js?v=b7f67d16:1:20335
    at ReactiveEffect.fn (chunk-ET7JUEXN.js?v=b7f67d16:1236:13)
    at ReactiveEffect.run (chunk-ET7JUEXN.js?v=b7f67d16:435:19)
    at get value (chunk-ET7JUEXN.js?v=b7f67d16:1248:107)
    at Proxy.<anonymous> (combobox.js?v=b7f67d16:1:21674)
    at renderComponentRoot (chunk-ET7JUEXN.js?v=b7f67d16:2350:17)
    at ReactiveEffect.componentUpdateFn [as fn] (chunk-ET7JUEXN.js?v=b7f67d16:7466:46)

It's because your breeds initial value is not an array but undefined. Try setting an empty array as the initial value of breeds.

It's because your breeds initial value is not an array but undefined. Try setting an empty array as the initial value of breeds.

I edited the repro like your advice and it still throws the same error.