Skip to content

Commit 951a0ef

Browse files
committed
Fix input uid
Signed-off-by: soupette <cyril@strapi.io>
1 parent 434831f commit 951a0ef

File tree

1 file changed

+4
-2
lines changed
  • packages/core/admin/admin/src/content-manager/components/InputUID

1 file changed

+4
-2
lines changed

packages/core/admin/admin/src/content-manager/components/InputUID/index.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ const InputUID = ({
123123
if (
124124
debouncedValue &&
125125
debouncedValue.trim().match(UID_REGEX) &&
126-
debouncedValue !== initialValue
126+
debouncedValue !== initialValue &&
127+
!value
127128
) {
128129
checkAvailability();
129130
}
@@ -154,7 +155,8 @@ const InputUID = ({
154155
!isCustomized &&
155156
isCreation &&
156157
debouncedTargetFieldValue &&
157-
modifiedData[attribute.targetField]
158+
modifiedData[attribute.targetField] &&
159+
!value
158160
) {
159161
generateUid.current(true);
160162
}

0 commit comments

Comments
 (0)