kirbydesign / designsystem

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

[BUG] Dropdown doesn't show items when used within Page #3391

Closed jakobe closed 4 months ago

jakobe commented 4 months ago

Describe the bug

When using the dropdown configured with expand="block" [usePopover]="true" within a kirby-page the card popover doesn't show when opening the dropdown.

Describe how to reproduce the bug

  1. Nest a kirby-dropdown within a kirby-page and configure it with expand="block" [usePopover]="true"
  2. Click on the dropdown to toggle/open it
  3. See the items not being shown

Which Kirby version was used?

9.3.2

What was the expected behavior?

The items being shown.

Are there any additional context?

Seems to be caused by the dropdown's ngAfterViewInit being run before the dropdown has a width, which is where the width of the card/popover is set when configured with popover+block. This is again caused by the ion-content element within kirby-page not having a width until it has been initialized.


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: