mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
chore(): sync with main
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
import type { ComponentInterface, EventEmitter } from '@stencil/core';
|
||||
import { Component, Element, Event, Host, Method, Prop, State, Watch, h } from '@stencil/core';
|
||||
import { Component, Element, Event, Host, Method, Prop, State, Watch, h, forceUpdate } from '@stencil/core';
|
||||
import { createLegacyFormController } from '@utils/forms';
|
||||
import type { LegacyFormController } from '@utils/forms';
|
||||
import { printIonWarning } from '@utils/logging';
|
||||
@ -248,6 +248,14 @@ export class Select implements ComponentInterface {
|
||||
|
||||
this.mutationO = watchForOptions<HTMLIonSelectOptionElement>(this.el, 'ion-select-option', async () => {
|
||||
this.updateOverlayOptions();
|
||||
|
||||
/**
|
||||
* We need to re-render the component
|
||||
* because one of the new ion-select-option
|
||||
* elements may match the value. In this case,
|
||||
* the rendered selected text should be updated.
|
||||
*/
|
||||
forceUpdate(this);
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user