15.16.0: list Print / Export "Current page" throws on every flat manage list - visibleRows is emitted only for hierarchy lists (#8434)

Aperta Adatta ai principianti
#8,548 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
75/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
javascript
Ambito
frontend

Direzione di ricerca

Inizia da list-page.js.template, in particolare dalla condizione gerarchica che definisce visibleRows e dal codice exportScopeRows(scope) vicino alle righe citate nell’issue. Verifica come gli elenchi piatti espongono paginatedItems, quindi esegui le azioni «Print» e «Export» per «Current page» sia sugli elenchi piatti sia su quelli gerarchici. Il lavoro è completato quando entrambe le azioni usano la pagina corrente negli elenchi piatti e mantengono il comportamento dell’albero espanso negli elenchi gerarchici.

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

Descrizione

15.16.0: list Print / Export "Current page" throws on every flat (non-hierarchy) manage list (#8434)

Observed (dirigiblelabs/dirigible:15.16.0, any generated manage list without hierarchy:; reproduced on base-sales-invoices SalesInvoice): More actions -> Print -> Current page does nothing, and the console shows Alpine Expression Error: Cannot read properties of undefined (reading 'map'). Export -> Current page fails the same way. All records works for both.

Cause. list-page.js.template (v15.16.0) defines get visibleRows() only inside #if($hierarchyProperty) (from line 262; the getter is at line 329). exportScopeRows(scope) (line 943, added by PR #8455 for #8434) is emitted unconditionally and reads this.visibleRows.map(r => r.row) for 'page'. On a flat list visibleRows is undefined.

Expected. "Current page" prints / exports the current page, this.paginatedItems on a flat list, as the #8434 comment says ("the current page, or the expanded tree in tree mode").

Suggested fix. Emit visibleRows (or a flat fallback) outside the hierarchy block, or have exportScopeRows use this.paginatedItems when the hierarchy block is absent.

Impact. Every BusinessIntents module list: the "Current page" choice of both new menus is dead. Found by the BusinessIntents train 1.39.0 S suite (base-sales-invoices B65).

🤖 Generated with Claude Code

Lingua principale
Java
Stelle
278
Fork
97
Merge medio
12h 43m
PR unite (30g)
296

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.