Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed input label position after slot changed
Browse files Browse the repository at this point in the history
Explicit12 committed Jan 9, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 6c75d64 commit 7fc2b27
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/ui.form-input/UInput.vue
Original file line number Diff line number Diff line change
@@ -198,8 +198,10 @@ function transformValue(value: string | number, exp: string | RegExp) {
return matches ? matches.join("") : "";
}
useMutationObserver(leftSlotWrapperRef, (mutations) => {
mutations.forEach(setLabelPosition);
useMutationObserver(leftSlotWrapperRef, (mutations) => mutations.forEach(setLabelPosition), {
childList: true,
characterData: true,
subtree: true,
});
function setLabelPosition() {
6 changes: 4 additions & 2 deletions src/ui.form-textarea/UTextarea.vue
Original file line number Diff line number Diff line change
@@ -154,8 +154,10 @@ function toggleReadonly(hasReadonly: boolean) {
}
}
useMutationObserver(leftSlotWrapperRef, (mutations) => {
mutations.forEach(setLabelPosition);
useMutationObserver(leftSlotWrapperRef, (mutations) => mutations.forEach(setLabelPosition), {
childList: true,
characterData: true,
subtree: true,
});
function setLabelPosition() {

0 comments on commit 7fc2b27

Please sign in to comment.