Some fixes for the bulk edit / delete modals#989
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the bulk edit and bulk delete modals to improve their UI/behaviour and fix a data binding issue.
Changes:
- Bulk edit modal: replace the plain
<textarea>description field with the sharedmdm-content-editor. - Bulk delete modal: adjust the table markup for imported/extended badges and rename the incoming selected-records payload field.
- Bulk edit modal: update standalone component imports to reflect the new editor component usage.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/app/modals/bulk-edit-modal/bulk-edit-modal.component.ts | Updates standalone imports to remove MatFormField/MatInput and include ContentEditorComponent. |
| src/app/modals/bulk-edit-modal/bulk-edit-modal.component.html | Replaces the description <textarea> with <mdm-content-editor> bound to item.description. |
| src/app/modals/bulk-delete-modal/bulk-delete-modal.component.ts | Changes how the modal reads the incoming selected records list (dataElementIdLst → dataElementIdList). |
| src/app/modals/bulk-delete-modal/bulk-delete-modal.component.html | Fixes table structure by moving imported/extended badges into a <td>. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| getData = () => { | ||
| this.records = this.data.dataElementIdLst; | ||
| this.records = this.data.dataElementIdList; |
There was a problem hiding this comment.
getData() now reads this.data.dataElementIdList, but several existing call sites still open this modal with dataElementIdLst (and some pass dataClassIdList). This will result in records being undefined/empty and the modal not showing/deleting the selected items. Consider supporting both keys here (e.g., prefer dataElementIdList but fall back to dataElementIdLst/dataClassIdList) or standardise the payload name across all callers in the same PR.
| this.records = this.data.dataElementIdList; | |
| const { dataElementIdList, dataElementIdLst, dataClassIdList } = this.data || {}; | |
| this.records = dataElementIdList ?? dataElementIdLst ?? dataClassIdList ?? []; |
No description provided.