nuxt / nuxt/ui

UInputMenu has wrong name attribute when multiple active

Open
#2,740 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

upstream/reka-ui
Dominant language
TypeScript
Stars
6.9k
Forks
1.1k
Avg merge
1d 7h
Merged PRs (30d)
57

Description

Environment
  • Operating System: Linux
  • Node Version: v22.4.0
  • Nuxt Version: 3.14.1592
  • CLI Version: 3.15.0
  • Nitro Version: 2.10.4
  • Package Manager: pnpm@9.14.2
  • Builder: -
  • User Config: default
  • Runtime Modules: @nuxt/ui@3.0.0-alpha.9, nuxt-auth-sanctum@0.5.2, @vueuse/nuxt@11.3.0
  • Build Modules: -
Is this bug related to Nuxt or Vue?

Nuxt

Version

v3.14.1592

Reproduction
<script setup lang="ts">
const places = ref([])
const placeItems = ref([{ id: 1, name: 'Place 1' }, { id: 2, name: 'Place 2' }])
</script>

<template>
<UInputMenu name="places"
            v-model="places"
            :items="placeItems"
            value-key="id"
            label-key="name"
            icon="i-lucide-search"
            class="w-full"
            multiple/>
</template>

Image

Description

Name attribute should be name[], not [name][].

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the UInputMenu implementation and reproduce the provided Vue example with multiple active values. Verify the generated name attribute, then confirm it is name[] rather than [name][] for multiple selections.

Written by the indexing model from the issue text.

Assessment

Tech stack
nuxtjs, typescript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.