mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-10 00:27: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 {
|
.select-key button {
|
||||||
border: 2px solid #5e9ed6;
|
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,
|
value: this.value,
|
||||||
text: this.text
|
text: this.text
|
||||||
});
|
});
|
||||||
|
this.emitStyle();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Listen('ionSelectOptionDidLoad')
|
@Listen('ionSelectOptionDidLoad')
|
||||||
@ -240,7 +241,6 @@ export class Select {
|
|||||||
this.value = this.multiple ? [] : undefined;
|
this.value = this.multiple ? [] : undefined;
|
||||||
}
|
}
|
||||||
this.name = this.name || this.selectId;
|
this.name = this.name || this.selectId;
|
||||||
this.emitStyle();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidLoad() {
|
componentDidLoad() {
|
||||||
@ -269,6 +269,7 @@ export class Select {
|
|||||||
this.text = checked.textContent;
|
this.text = checked.textContent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.emitStyle();
|
||||||
}
|
}
|
||||||
|
|
||||||
getLabel() {
|
getLabel() {
|
||||||
|
|||||||
@ -207,10 +207,36 @@
|
|||||||
<ion-item>
|
<ion-item>
|
||||||
<ion-label>Disabled</ion-label>
|
<ion-label>Disabled</ion-label>
|
||||||
<ion-select multiple disabled="true">
|
<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-select>
|
||||||
</ion-item>
|
</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>
|
</ion-list>
|
||||||
|
|
||||||
<div text-center>
|
<div text-center>
|
||||||
|
|||||||
Reference in New Issue
Block a user