dce-reactkit 3.4.0-beta.7 → 3.4.0-beta.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dce-reactkit",
3
- "version": "3.4.0-beta.7",
3
+ "version": "3.4.0-beta.8",
4
4
  "description": "Shared components for Harvard DCE apps",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -251,7 +251,7 @@ const AddOrEditDBEntry: React.FC<Props> = (props) => {
251
251
  }
252
252
 
253
253
  // Check if unique field is unique
254
- if (field.objectKey === idPropName) {
254
+ if (field.objectKey === idPropName && !dbEntryToEdit) {
255
255
  if (entries.find((e) => { return e[idPropName] === value; })) {
256
256
  validationError = `An item with the ${field.label} ${value} already exists. ${field.label} must be unique.`;
257
257
  return validationError;