Fixed #1026 - [BUG] PrimeVue 3.3.0: Dropdown's select item logic is broken
parent
0646ca72eb
commit
14fd05f393
|
@ -136,9 +136,6 @@ export default {
|
||||||
this.itemsWrapper = null;
|
this.itemsWrapper = null;
|
||||||
this.overlay = null;
|
this.overlay = null;
|
||||||
},
|
},
|
||||||
updated() {
|
|
||||||
this.scrollValueInView();
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
getOptionLabel(option) {
|
getOptionLabel(option) {
|
||||||
return this.optionLabel ? ObjectUtils.resolveFieldData(option, this.optionLabel) : option;
|
return this.optionLabel ? ObjectUtils.resolveFieldData(option, this.optionLabel) : option;
|
||||||
|
@ -391,6 +388,7 @@ export default {
|
||||||
},
|
},
|
||||||
onOverlayEnter() {
|
onOverlayEnter() {
|
||||||
this.overlay.style.zIndex = String(DomHandler.generateZIndex());
|
this.overlay.style.zIndex = String(DomHandler.generateZIndex());
|
||||||
|
this.scrollValueInView();
|
||||||
this.appendContainer();
|
this.appendContainer();
|
||||||
this.alignOverlay();
|
this.alignOverlay();
|
||||||
this.bindOutsideClickListener();
|
this.bindOutsideClickListener();
|
||||||
|
@ -583,7 +581,7 @@ export default {
|
||||||
if (this.overlay) {
|
if (this.overlay) {
|
||||||
let selectedItem = DomHandler.findSingle(this.overlay, 'li.p-highlight');
|
let selectedItem = DomHandler.findSingle(this.overlay, 'li.p-highlight');
|
||||||
if (selectedItem) {
|
if (selectedItem) {
|
||||||
DomHandler.scrollInView(this.itemsWrapper, DomHandler.findSingle(this.overlay, 'li.p-highlight'));
|
this.itemsWrapper.scrollTop = selectedItem.offsetTop;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue