Skip to content

Commit f467533

Browse files
committed
BulkUpdateForm: Fix issue with editing not allowed values
1 parent c39e999 commit f467533

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

packages/components/src/internal/components/forms/BulkUpdateForm.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,14 @@ export class BulkUpdateForm extends PureComponent<BulkUpdateFormProps, State> {
202202

203203
getValidSelectedIds = (): string[] => {
204204
const { editStatusData, selectedIds } = this.props;
205+
205206
if (editStatusData) {
206-
return editStatusData.getActionableIds().map(id => id.toString(10));
207+
const notPermitted = new Set(
208+
editStatusData.notPermitted.map(row => caseInsensitive(row, 'RowId').toString(10))
209+
);
210+
// Only return the permitted IDs. The notAllowed IDs are considered valid because the user can change
211+
// values (e.g. sample status) in the form to make them allowed
212+
return selectedIds.filter(id => !notPermitted.has(id));
207213
}
208214
return selectedIds;
209215
};

0 commit comments

Comments
 (0)