Submission Form Allows Deletion of All Repeating Item Entries

Aperta Adatta ai principianti
#6,511 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
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
angular, typescript
Ambito
frontend

Direzione di ricerca

Il pulsante di eliminazione è collegato a removeItem() in src/app/shared/form/form.component.ts, che il report collega alle versioni 8.4 e 10.1 per confronto. Inizia da lì, quindi riproduci in un campo ripetibile di un modulo di invio: aggiungi una voce, elimina la prima e controlla quella rimasta. È completato quando una voce rimasta da sola non ha il pulsante di eliminazione, l'ultima voce non può essere rimossa e il pulsante per aggiungere altro resta visibile.

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

Descrizione

bug needs triage

Describe the bug

When clicking the "Add More" button in a submission form, and then deleting the first item in the array of two, the trash / deletion button remains next to the single item, allowing deletion of all items in the array, and removing the add more button, forcing the user to reload the page if they want to add values to that submission form input. Running DSpace 8.4, appears on both Chrome and Safari.

After investigation, this bug does not appear in the newest stable release of DSpace (10.1), and I believe this is because the removeItem() function that the delete button calls was changed in version 10.x – see the difference between version 8.4 and version 10.1 here, where in the latter, the function checks the form array length and only removes the input if it is greater than 1.

I haven't tested it, but I therefore believe this issue affects all DSpace versions 8.x and 9.x, since this code only exists in 10.x.

To Reproduce

  1. Begin the submission process
  2. Type something into a repeatable form element
  3. Click 'Add More'
  4. Delete the first element where a value exists
  5. The empty element should have a delete button that allows removal of all inputs

Expected behavior

Single elements in repeatable input arrays should not have the delete button appear.

Related work

TBD

Lingua principale
TypeScript
Stelle
180
Fork
577
Merge medio
2g 18h
PR unite (30g)
115

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 DSpace/dspace-angular

Tutte le issue di DSpace/dspace-angular

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.