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

Dropdown scroll height cannot be set from preset #147

Open
Lehoczky opened this issue Feb 15, 2024 · 0 comments
Open

Dropdown scroll height cannot be set from preset #147

Lehoczky opened this issue Feb 15, 2024 · 0 comments

Comments

@Lehoczky
Copy link
Contributor

The dropdown component has a scroll-height property, which sets the height of the item list directly on the element. This has higher specificity than setting it from a preset:

image

You can see the default class from the lara preset here: https://github.com/primefaces/primevue-tailwind/blob/main/presets/lara/dropdown/index.js#L105

Since the scroll-height property defaults to 200px, it even sets the height when the developer doesn't specify it, overriding the class from the presets. I think the easiest way to "fix" this, is to remove the max-h-[200px] from the presets and just always use the scroll-height property. A warning about this in the docs would be a nice addition too.

wrapper: {
        class: [
-            // Sizing
-            'max-h-[200px]',

            // Misc
            'overflow-auto'
        ]
    },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant