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

Undesired gap between list items when default item is set in adaptive mode #4563

Open
mbechev opened this issue Mar 13, 2025 · 0 comments
Open

Comments

@mbechev
Copy link
Contributor

mbechev commented Mar 13, 2025

Description

When setting the defaultItem of the DropDownList and enabling adaptive mode, а huge gap appears between the default item and the rest of the options from the list:

Image

If defaultItem is not being set, the list item layout looks ok.

The KendoReact DropDownList also renders the default item correctly in adaptive mode:

https://stackblitz.com/edit/react-lkjcjwh6?file=app%2Fapp.jsx

Image

Steps To Reproduce

Open the DropDownList in smaller screen resolution:
https://stackblitz.com/edit/angular-njpjstum?file=src%2Fapp%2Fapp.component.ts

Actual Behavior

The gap appears when defaultItem is set.

Expected Behavior

The options layout should be unchanged when defaultItem is set.

Workaround

A possible workaround is to overwrite the CSS styles such as:

      .k-actionsheet-content {
            .k-list-container:has(:nth-child(2)) > :first-child {
                flex-basis: 2.25rem;
                flex-grow: 0;
            }
        }

https://stackblitz.com/edit/angular-njpjstum-lnj3xcc7?file=src%2Fapp%2Fapp.component.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant