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) {
@@ -5,7 +5,8 @@
margin-top: 0;
}
fieldset p:first-of-type, & > p:first-of-type {
fieldset p:first-of-type,
&>p:first-of-type {
margin-top: 0;
}
@@ -24,7 +25,7 @@
fieldset {
flex: 0 1 auto;
p:has(input[hidden]) {
.form-group:has(input[hidden]) {
// when the input is hidden, hide the whole label+input+help text group
display: none;
}