mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-16 10:01:59 +08:00

BREAKING CHANGE: The following components have been updated to remove the checked or selected properties: - Radio - Segment Button - Select Developers should set the value property on the respective parent components in order to managed checked/selected status. Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
39 lines
749 B
TypeScript
39 lines
749 B
TypeScript
import { Component, ComponentInterface, Element, Host, Prop, h } from '@stencil/core';
|
|
|
|
import { getIonMode } from '../../global/ionic-global';
|
|
|
|
@Component({
|
|
tag: 'ion-select-option',
|
|
shadow: true,
|
|
styleUrl: 'select-option.scss'
|
|
})
|
|
export class SelectOption implements ComponentInterface {
|
|
|
|
private inputId = `ion-selopt-${selectOptionIds++}`;
|
|
|
|
@Element() el!: HTMLElement;
|
|
|
|
/**
|
|
* If `true`, the user cannot interact with the select option.
|
|
*/
|
|
@Prop() disabled = false;
|
|
|
|
/**
|
|
* The text value of the option.
|
|
*/
|
|
@Prop() value?: any | null;
|
|
|
|
render() {
|
|
return (
|
|
<Host
|
|
role="option"
|
|
id={this.inputId}
|
|
class={getIonMode(this)}
|
|
>
|
|
</Host>
|
|
);
|
|
}
|
|
}
|
|
|
|
let selectOptionIds = 0;
|