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)
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
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:
- Open
#/Project/create. The checkbox renders unchecked (the default is not applied yet). - The user ticks Billable, then unticks it: they want a non-billable project.
isChecked()returnsfalse. - The options arrive,
init()continues and setsform.Billable = true. The box is checked again, and Create savesBillable = 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
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di eclipse-dirigible/dirigible
-
intent: a create-from without fromStatus answers 200 on a missing or unknown source id (no 400/404)Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
eclipse-dirigible/dirigible#7945 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
eclipse-dirigible/dirigible#7891 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
eclipse-dirigible/dirigible#6538 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
eclipse-dirigible/dirigible#4812 ·
I maintainer di solito rispondono entro 1 giorno
-
bug component-ide efforts-medium priority-medium usability web-ide
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
eclipse-dirigible/dirigible#2920 · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di eclipse-dirigible/dirigible
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
-
[Bug]: REST API URL starting with "http" but no scheme (e.g. httpbin.org/get) is not given an http:// prefixForse già presa @ItsDeadlyProgrammer l’ha presa 1 giorno fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
appsmithorg/appsmith#42471 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
code-maintenance
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
-
bug priority: medium Review effort [1-5]: 3 status: needs-triage type: bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
carlos-emr/carlos#5258 ·
I maintainer di solito rispondono entro 1 giorno