mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-09 16:16:41 +08:00
fix(select): emit proper styles for floating & stacked labels
This commit is contained in:
@ -69,3 +69,12 @@ ion-select {
|
||||
.select-key button {
|
||||
border: 2px solid #5e9ed6;
|
||||
}
|
||||
|
||||
|
||||
// Stacked & Floating Select
|
||||
// --------------------------------------------------
|
||||
|
||||
.item-label-stacked .select,
|
||||
.item-label-floating .select {
|
||||
max-width: 100%;
|
||||
}
|
||||
@ -181,6 +181,7 @@ export class Select {
|
||||
value: this.value,
|
||||
text: this.text
|
||||
});
|
||||
this.emitStyle();
|
||||
}
|
||||
|
||||
@Listen('ionSelectOptionDidLoad')
|
||||
@ -240,7 +241,6 @@ export class Select {
|
||||
this.value = this.multiple ? [] : undefined;
|
||||
}
|
||||
this.name = this.name || this.selectId;
|
||||
this.emitStyle();
|
||||
}
|
||||
|
||||
componentDidLoad() {
|
||||
@ -269,6 +269,7 @@ export class Select {
|
||||
this.text = checked.textContent;
|
||||
}
|
||||
}
|
||||
this.emitStyle();
|
||||
}
|
||||
|
||||
getLabel() {
|
||||
|
||||
@ -207,10 +207,36 @@
|
||||
<ion-item>
|
||||
<ion-label>Disabled</ion-label>
|
||||
<ion-select multiple disabled="true">
|
||||
<ion-select-option checked="true">Selected Text</ion-select-option>
|
||||
<ion-select-option selected="true">Selected Text</ion-select-option>
|
||||
</ion-select>
|
||||
</ion-item>
|
||||
|
||||
<ion-item>
|
||||
<ion-label stacked>Stacked</ion-label>
|
||||
<ion-select>
|
||||
<ion-select-option>Default</ion-select-option>
|
||||
<ion-select-option>Other</ion-select-option>
|
||||
<ion-select-option>N/A</ion-select-option>
|
||||
</ion-select>
|
||||
</ion-item>
|
||||
|
||||
<ion-item>
|
||||
<ion-label floating>Floating</ion-label>
|
||||
<ion-select>
|
||||
<ion-select-option>Default</ion-select-option>
|
||||
<ion-select-option>Other</ion-select-option>
|
||||
<ion-select-option>N/A</ion-select-option>
|
||||
</ion-select>
|
||||
</ion-item>
|
||||
|
||||
<ion-item>
|
||||
<ion-label floating>Floating</ion-label>
|
||||
<ion-select>
|
||||
<ion-select-option selected="true">Default</ion-select-option>
|
||||
<ion-select-option>Other</ion-select-option>
|
||||
<ion-select-option>N/A</ion-select-option>
|
||||
</ion-select>
|
||||
</ion-item>
|
||||
</ion-list>
|
||||
|
||||
<div text-center>
|
||||
|
||||
Reference in New Issue
Block a user