Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SelectMenu content is cut by Modal overflow-hidden #1459

Closed
kmilogp8496 opened this issue Mar 2, 2024 · 4 comments · Fixed by #1460
Closed

SelectMenu content is cut by Modal overflow-hidden #1459

kmilogp8496 opened this issue Mar 2, 2024 · 4 comments · Fixed by #1460
Labels
bug Something isn't working

Comments

@kmilogp8496
Copy link
Contributor

Environment

  • Operating System: Linux
  • Node Version: v20.9.0
  • Nuxt Version: 3.10.3
  • CLI Version: 3.10.1
  • Nitro Version: 2.8.1
  • Package Manager: pnpm@8.15.4

Version

v2.14.1

Reproduction

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

Description

When a SelectMenu is open inside a Modal component, if the SelectMenu content exceeds the Modal dimensions, the overflow is hidden so the content can't be seen.

Additional context

image

Logs

No response

@kmilogp8496 kmilogp8496 added the bug Something isn't working label Mar 2, 2024
@Oiwawa
Copy link

Oiwawa commented Mar 5, 2024

Hi there. I am using the latest versions of nuxt/ui and nuxt/ui-pro where this issue should be fixed but I'm still having the issue.

image

"@nuxt/ui-pro@^1.0.0": version "1.0.2"
"@nuxt/ui@^2.14.2": version "2.14.2"

Here is the full component, it's based on the exemples found in the SelectMenu doc as well as the Modal from the Template Dashboard repo


        <UDashboardModal v-model="isNewNetworkModalOpen" title="Nouveau réseau" description="Créer un nouveau réseau" >
         <NetworkCreateForm @close="isNewNetworkModalOpen = false" />
        </UDashboardModal>
<template>
  <UForm :validate-on="['submit']" :state="network" class="space-y-4" @submit="onSubmit">
    <UFormGroup label="Nom du réseau" name="networkName">
      <UInput v-model="network.name" label="networkName" required/>
    </UFormGroup>

    <UFormGroup label="Domaine d'activité" name="networkName">
      <USelectMenu v-model="network.activityType" label="networkName" :options="domains.data" option-attribute="name" value-attribute="id" placeholder="- Choisir un domaine d'activité - " required />
    </UFormGroup>

    <div class="flex justify-end gap-3">
      <UButton label="Annuler" color="gray" variant="ghost" @click="emit('close')" />
      <UButton type="submit" label="Créer" color="blue" />
    </div>
  </UForm>
</template>

I have upgraded versions just a few hours after this was closed. Thanks for the help ! @benjamincanac

Copy link
Member

@Oiwawa Mmmh it might be because of an overflow-y-auto in the DashboardModal component. Can you try to set :ui="{ body: { base: 'overflow-visible' } }" on the UDashboardModal?

@Oiwawa
Copy link

Oiwawa commented Mar 5, 2024

@Oiwawa Mmmh it might be because of an overflow-y-auto in the DashboardModal component. Can you try to set :ui="{ body: { base: 'overflow-visible' } }" on the UDashboardModal?

Yep this fixes it. Thanks !
image

Copy link
Member

I've updated it as well in @nuxt/ui-pro repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants