Appearance
Bulk edit
How people change the same fields on many selected records at once.
bulkoperations-bulkeditmodal--defaultOpen in Storybook ↗When it applies
- A list whose entity type offers a Bulk edit action in its selection action bar. The action needs at least one selected item; without a selection it stays disabled, with the reason in its tooltip.
- The selection may mix entity types. Each type brings the fields of its own form.
- A selection holds at most the tenant's select-all limit.
- Not for one record: edit it on its detail page, see per-field editing.
- Not for merging duplicates: see merge entities.
How it works
- The action opens a modal with the selection beside one form. People see what they are about to change. The selected items are listed on the left; unticking an item takes it out of the selection. The form sits on the right, under Bulk edit and the line Only the fields you fill in are changed. Below 56rem of modal width the list sits above the form.
- One form is merged from the forms of every type in the selection. A field shared by all types appears once. A field that only some types have shows how far it reaches under it: Applies to 2 of 3 selected items. When one field behaves differently on some types (another input), the most common input wins and a note names the types that are left out. Types without a form are named too: No form is configured for these types, they will not be changed.
- Only touched fields are written. An empty form changes nothing, so untouched fields are never sent, required rules are dropped and no default value is filled in. Each record only gets the fields its own type has. If nothing was touched, Apply only warns: No changes.
- Emptying a field is its own action. An empty input reads as "leave alone", so clearing needs intent. The trash button next to a field marks it for emptying: the input dims and the button turns into Undo emptying. A field that every type requires has no trash button.
- For relations, people choose what happens. Picked relations can mean three things, so the form asks above the fields: What should happen to the relations you pick below? The choices are add to the existing ones (the default), replace the existing ones and remove from the existing ones, each with a one-line explanation. Emptying a relation field removes all relations of that type. The question only shows when the form has a relation field.
- Apply asks first. A bulk change is hard to undo. A confirm dialog sums it up: You are about to change 2 field(s) on 3 selected entities. Chosen relation action: replace the existing ones.
- While it runs, the modal is blocked. A spinner and Applying your changes, this may take a while... cover the modal, so nothing changes halfway.
- The result tells per record what happened. Records that succeeded leave the selection and the list reloads. When all succeeded, the modal closes with Entities successfully updated. Records that failed stay selected and the modal stays open, with Bulk edit partially failed. Records that have none of the changed fields are left alone and reported as Items skipped.
bulkoperations-bulkeditmodal--changedOpen in Storybook ↗Above: a description typed in, Rights statement marked for emptying and the relation choice set to replace.
bulkoperations-bulkeditmodal--confirmOpen in Storybook ↗bulkoperations-bulkeditmodal--applyingOpen in Storybook ↗Components
| Component | Role in this pattern |
|---|---|
| Selection action bar | holds the Bulk edit action and its disabled reason |
| Modal | the wide modal around the list and the form; the confirm dialog before applying |
| Entity list element | the selected items, with their checkboxes |
| Dynamic form | renders the merged fields and the Apply button |
| Field row | each field's label and input, with the trash button beside it |
| Dropdown | the relation choice |
| Feedback | the blocking overlay and the result notifications |
Keyboard & accessibility
| Key | Effect |
|---|---|
| Tab | moves through the list, the relation choice, the fields, their trash buttons and Apply |
| Enter / Space | on a trash button: marks the field for emptying, or undoes it |
| Escape | closes the modal; nothing is applied |
- The trash button is named Empty field, or Undo emptying once pressed.
- The blocking overlay is a
role="alert"region, so its message is announced.
Content
- Intro: Only the fields you fill in are changed. For relations, choose whether they are added, replaced or removed.
- Relation explanations: The relations you pick are added. Existing relations stay. · The relations you pick replace every existing relation of that same type. · The relations you pick are removed wherever they occur. Use 'Empty field' to empty a whole field.
- Notifications: No changes · Entities successfully updated · Items skipped · Bulk edit partially failed.
- Translation keys:
bulk-operations.bulk-edit*,bulk-operations.relation-mode.*,bulk-operations.field-partial-scope,bulk-operations.clear-field,bulk-operations.keep-field,confirm.bulk-edit.*,modals.bulkEditingEntities.
Related
Selection action bar · Merge entities · Dynamic form · Per-field editing · Feedback · Modal