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

n-select menu max-height not working #5947

Closed
5 tasks done
Luffytaro opened this issue May 14, 2024 · 2 comments
Closed
5 tasks done

n-select menu max-height not working #5947

Luffytaro opened this issue May 14, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@Luffytaro
Copy link

Describe the bug

image

If menuProps style maxHeight is set to a smaller value than the standard height of the dropdown, the options of the select component will reach outside of the menu instead of being constrained to the maxHeight.

Steps to reproduce

  1. use n-select component
  2. add maxHeight style to menuProps
  3. choose pixel value smaller than standard height

image

Link to minimal reproduction

https://codesandbox.io/p/sandbox/flamboyant-waterfall-vthqhz?file=%2Fsrc%2FDemo.vue

System Info

System:
    OS: Linux 5.10 Ubuntu 20.04.6 LTS (Focal Fossa)
    CPU: (12) x64 13th Gen Intel(R) Core(TM) i7-1365U
    Memory: 18.63 GB / 24.79 GB
    Container: Yes
    Shell: 5.0.17 - /bin/bash
  Binaries:
    Node: 19.9.0 - ~/.nvm/versions/node/v19.9.0/bin/node
    npm: 9.6.3 - ~/.nvm/versions/node/v19.9.0/bin/npm
  npmPackages:
    naive-ui: ^2.31.0 => 2.38.2 
    vue: ^3.3 => 3.4.27

Used Package Manager

npm

Validations

@Luffytaro Luffytaro added the untriaged need to sort label May 14, 2024
@OrbisK OrbisK added bug Something isn't working and removed untriaged need to sort labels May 20, 2024
@jizai1125
Copy link
Contributor

jizai1125 commented May 21, 2024

Can use the theme-overrides prop

<template>
  <n-select
    :theme-overrides="{
      peers: {
        InternalSelectMenu: {
          height: '100px'
        }
      }
    }"
  />
</template>

@jahnli
Copy link
Collaborator

jahnli commented Jun 2, 2024

This issue does not have any recent activity. If you are still experiencing similar problems, open a new error, including a minimal copy of the problem

@jahnli jahnli closed this as completed Jun 2, 2024
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

No branches or pull requests

4 participants