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

fix(segment): setting value via binding updates button state #28837

Merged
merged 1 commit into from
Jan 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions core/src/components/segment/segment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,14 @@ export class Segment implements ComponentInterface {
async componentDidLoad() {
this.setCheckedClasses();

/**
* If the value changes before watchers
* are setup, then the ionSelect watch callback
* will not fire. As a result, we manually
* fire this event when Select is loaded.
*/
this.ionSelect.emit({ value: this.value });

/**
* We need to wait for the buttons to all be rendered
* before we can scroll.
Expand Down
Loading