fix(web): forms open as new, not touched from the last time

Opening a drawer form refilled its model only, so a field touched the
time before came back showing its errors. They reset the form state
now (touched and dirty) along with the values.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-15 20:25:52 +02:00
parent a32b669c8b
commit f4e40ffabc
4 changed files with 7 additions and 7 deletions

View File

@@ -792,7 +792,7 @@ export class BoardPage {
);
if (this.project.workflow().requiresReason(to)) {
this.pendingMove = { issueId, to };
this.reasonModel.set({ text: '' });
this.reason().reset({ text: '' });
this.drawer.open(`Mover a «${this.statusLabel(to)}»`, this.reasonForm());
return;
}
@@ -886,7 +886,7 @@ export class BoardPage {
const types = this.typeOptions();
if (!types.some((t) => t.value === this.newType()))
this.newType.set(types[0]?.value ?? '');
this.model.set({
this.f().reset({
title: '',
description: '',
figmaUrl: '',

View File

@@ -1369,7 +1369,7 @@ export class IssuePage {
protected move(to: string): void {
if (this.project.workflow().requiresReason(to)) {
this.pendingStatus = to;
this.reasonModel.set({ text: '' });
this.reason().reset({ text: '' });
this.drawer.open(`Mover a «${this.statusLabel(to)}»`, this.reasonForm());
return;
}
@@ -1547,7 +1547,7 @@ export class IssuePage {
protected openEditComment(comment: Comment): void {
this.editingComment = comment.id;
this.commentEditModel.set({ body: comment.body });
this.commentEdit().reset({ body: comment.body });
this.trackEditing(
this.drawer.open('Editar comentario', this.commentEditForm()),
);
@@ -1567,7 +1567,7 @@ export class IssuePage {
protected openEdit(): void {
const issue = this.facade.issue();
if (!issue) return;
this.editModel.set({
this.edit().reset({
title: issue.title,
description: issue.description ?? '',
labels: issue.labels.join(', '),

View File

@@ -385,7 +385,7 @@ export class ProjectsPage implements OnInit {
}
protected openCreate(): void {
this.model.set({
this.f().reset({
key: '',
name: '',
description: '',

View File

@@ -422,7 +422,7 @@ export class ReleasesPage {
protected readonly when = releaseWhen;
protected openCreate(): void {
this.model.set({ name: '', description: '', targetDate: '' });
this.f().reset({ name: '', description: '', targetDate: '' });
this.drawer.open('Nueva release', this.createForm());
}