kirbydesign / designsystem

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

[BUG] Segmented Control looses it's checked state when `Items` are updated #3459

Closed jakobe closed 2 months ago

jakobe commented 2 months ago

Describe the bug

After upgrading to Ionic standalone components in PR #3349 there is a timing issue between Angular's asynchronous binding and Ionic's state watchers that makes the checked segment loose it's checked state when updating Items even when the value of the items are the same.

This is a bug in @ionic/angular/standalone as reported here: https://github.com/ionic-team/ionic-framework/issues/29414

Describe how to reproduce the bug

  1. Go to https://cookbook.kirby.design/#/home/showcase/segmented-control
  2. Click on 'Chip' on the Configuration panel
  3. See the first item in the segmented control not being checked.

Which Kirby version was used?

9.4.1

What was the expected behavior?

The item with a value that matches the value of the Segmented Control being highlighted/checked.

Add any screenshots

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: