fix the select dropdown menu was positioned incorrectly after filter box being focused
This commit is contained in:
@@ -213,9 +213,7 @@ function isSecondarySelected(subItem: unknown): boolean {
|
||||
return isSecondaryValueSelected(currentSecondaryValue.value, subItem);
|
||||
}
|
||||
|
||||
function onPrimaryItemClicked(item: unknown): void {
|
||||
updateCurrentPrimaryValue(currentPrimaryValue, item);
|
||||
|
||||
function updateMenuPosition(): void {
|
||||
if (props.autoUpdateMenuPosition) {
|
||||
nextTick(() => {
|
||||
const mainSelectRect = document.querySelector('.two-column-main-select')?.getBoundingClientRect();
|
||||
@@ -233,6 +231,11 @@ function onPrimaryItemClicked(item: unknown): void {
|
||||
}
|
||||
}
|
||||
|
||||
function onPrimaryItemClicked(item: unknown): void {
|
||||
updateCurrentPrimaryValue(currentPrimaryValue, item);
|
||||
updateMenuPosition();
|
||||
}
|
||||
|
||||
function onSecondaryItemClicked(subItem: unknown): void {
|
||||
updateCurrentSecondaryValue(currentSecondaryValue, subItem);
|
||||
}
|
||||
@@ -252,6 +255,7 @@ function onInputFocused(input: VTextField | null | undefined, focused: boolean):
|
||||
if (input && focused) {
|
||||
nextTick(() => {
|
||||
setChildInputFocus(input?.$el, 'input');
|
||||
updateMenuPosition();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user