mirror of
https://github.com/mayswind/ezbookkeeping.git
synced 2026-05-20 09:44:26 +08:00
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);
|
return isSecondaryValueSelected(currentSecondaryValue.value, subItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
function onPrimaryItemClicked(item: unknown): void {
|
function updateMenuPosition(): void {
|
||||||
updateCurrentPrimaryValue(currentPrimaryValue, item);
|
|
||||||
|
|
||||||
if (props.autoUpdateMenuPosition) {
|
if (props.autoUpdateMenuPosition) {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
const mainSelectRect = document.querySelector('.two-column-main-select')?.getBoundingClientRect();
|
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 {
|
function onSecondaryItemClicked(subItem: unknown): void {
|
||||||
updateCurrentSecondaryValue(currentSecondaryValue, subItem);
|
updateCurrentSecondaryValue(currentSecondaryValue, subItem);
|
||||||
}
|
}
|
||||||
@@ -252,6 +255,7 @@ function onInputFocused(input: VTextField | null | undefined, focused: boolean):
|
|||||||
if (input && focused) {
|
if (input && focused) {
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
setChildInputFocus(input?.$el, 'input');
|
setChildInputFocus(input?.$el, 'input');
|
||||||
|
updateMenuPosition();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user