mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-11-09 16:16:41 +08:00
feat(picker): add ability to use picker inline (#26336)
This commit is contained in:
@ -171,14 +171,16 @@ export class PickerColumnCmp implements ComponentInterface {
|
||||
}
|
||||
button.style.transform = transform;
|
||||
|
||||
// Update selected item
|
||||
if (selected !== opt.selected) {
|
||||
opt.selected = selected;
|
||||
if (selected) {
|
||||
button.classList.add(PICKER_OPT_SELECTED);
|
||||
} else {
|
||||
button.classList.remove(PICKER_OPT_SELECTED);
|
||||
}
|
||||
/**
|
||||
* Ensure that the select column
|
||||
* item has the selected class
|
||||
*/
|
||||
opt.selected = selected;
|
||||
|
||||
if (selected) {
|
||||
button.classList.add(PICKER_OPT_SELECTED);
|
||||
} else {
|
||||
button.classList.remove(PICKER_OPT_SELECTED);
|
||||
}
|
||||
}
|
||||
this.col.prevSelected = selectedIndex;
|
||||
|
||||
Reference in New Issue
Block a user