kirbydesign / designsystem

Kirby Design System
https://cookbook.kirby.design
MIT License
84 stars 22 forks source link

[BUG] Dropdown is clipped by kirby-card #2605

Closed joachimboggild closed 8 months ago

joachimboggild commented 1 year ago

Describe the bug

I have an Angular app in which I have placed a kirby-dropdown inside a kirby-card. I do not use any outer kirby components. Viewing the page in a desktop browser (Chrome on Windows), when I click the dropdown in the browser to expand it, the dropdown is not shown fully, but is clipped by the confines of the kirby-card.

Describe how to reproduce the bug

  1. Create an Angular component with this html:

    <h1>Opret risiko</h1>
    <kirby-card [hasPadding]="true">
    <form [formGroup]="form">
    
        <div class="form-field">
            <p class="dropdown-label kirby-text-small-light">Juridisk enhed</p>
            <kirby-dropdown
                formControlName="juridiskEnhed"
                placeholder="Angiv juridisk enhed"
                [items]="['JB', 'JR', 'JF', 'JI', 'Koncern']"
            ></kirby-dropdown>
        </div>
    
    </form>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    <p>&nbsp;</p>
    </kirby-card>
    <button kirby-button (click)="save()">Gem</button>
    <button kirby-button (click)="cancel()">Annuller</button>
  2. View in desktop browser

  3. Click the dropdown

  4. See error: The dropdown is clipped by the kirby-card

Which Kirby version was used?

7.2.1

What was the expected behavior?

The dropdown should be fully visible, being displayed in front of the kirby card and extending past it.

Add any screenshots

image

Please complete the following information:

Are there any additional context?


Checklist:

The following tasks should be carried out in sequence in order to follow the process of contributing correctly.

Verification

To make sure the bug is not intended behaviour; it should be verified by a member of team Kirby before moving on to implementation.

Implementation

The contributor who wants to implement this issue should:

Review

Once the issue has been implemented and is ready for review:

RasmusKjeldgaard commented 1 year ago

@joachimboggild could you try setting the usePopover input on the dropdown?