Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

ui: a create form applies its field defaults after the awaited option loads - input made while the page loads is overwritten (Billable unticked comes back ticked)

Aperta Adatta ai principianti
#7,958 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
80/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
java, javascript, playwright
Ambito
frontend, testing

Direzione di ricerca

Start with the generated <Entity>FormPage.js init() method and trace when create defaults and query parameter prefills are applied relative to loadOptions(true). Reproduce by delaying CustomerController option loading and changing Project.Billable while the form loads. Done means the user's chosen value survives loading and the create flow saves it; the issue gives no test file to run.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

What

On the generated create form (the manage/form page, <Entity>FormPage.js init()), the field defaults are applied after the page awaits its option loads:

await this.loadOptions(true);          // every relation's option list
...
if ('Billable' in this.form) this.form.Billable = true;   // the field's default
...
this.state = 'empty-form';

The inputs are rendered and enabled during loadOptions, so a user can type, tick or pick in that window. When the loads finish, init() assigns the defaults over whatever the user entered. On a tenant with long option lists, the window is seconds long.

It is the same family as #7604 / #7951, where a dependsOn fill is lost when the trigger is picked during the first load. This one is the plain field default, and it occurs on the non-document form as well.

Reproduction (dirigiblelabs/dirigible:14.93.0)

BusinessIntents base-projects was published with its uses: owners. Project.Billable is a boolean with default true. A Playwright route delays CustomerController by 4 s, which stands in for a tenant with many customers:

  1. Open #/Project/create. The checkbox renders unchecked (the default is not applied yet).
  2. The user ticks Billable, then unticks it: they want a non-billable project. isChecked() returns false.
  3. The options arrive, init() continues and sets form.Billable = true. The box is checked again, and Create saves Billable = true.

Output: before user false / user chose false / after load true true.

The same window makes @aerokit/sdk's generic crud flow flaky. locator.setChecked reports "Clicking the checkbox did not change its state" when the default lands between its state read and its click. It is red on the BusinessIntents demo image, which has the bigger data set: Project.Billable and InvoiceTemplate.Active (BusinessIntents/businessintents-catalog#328). Those rows were green on 14.88.0, and the init ordering is unchanged, so only the timing moved.

Expected

A value the user entered before the page finished loading is kept. Either of these would do:

  • apply the create-mode defaults and query-param prefills before awaiting loadOptions, since none of them needs the options;
  • or keep the inputs inert until state === 'empty-form'.

The sdk flow could also wait for that state before it fills the form. That is a guard for the harness, not the fix.

Lingua principale
Java
Stelle
278
Fork
97
Merge medio
16h 46m
PR unite (30g)
265

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di eclipse-dirigible/dirigible

Tutte le issue di eclipse-dirigible/dirigible

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.