Apply review comments

This commit is contained in:
2026-05-10 13:02:13 +02:00
parent 2d86ba67f4
commit 5551fdc953
3 changed files with 30 additions and 42 deletions
@@ -7,16 +7,15 @@ Alpine.data("existing_user_subscription_form", () => ({
dateOfBirth: "",
dateOfBirthHidden: true,
async init() {
init() {
this.$watch("selectedUser", async () => {
await this.loadProfile(Number.parseInt(this.selectedUser, 10));
});
// Wait for web components to load
await this.$nextTick();
// Force to detect the initial value
this.selectedUser = this.$refs.userSelect.widget.getValue();
this.$nextTick(() => {
// Force to detect the initial value
this.selectedUser = this.$refs.userSelect.widget.getValue();
});
},
async loadProfile(userId: number) {