Remove AUTO-DRAFT in product name field on create new product page (#37982)

* Remove AUTO-DRAFT in product name field on create new product page #37930

* Add changelog file

* Remove non needed useEffect import
This commit is contained in:
Maikel David Pérez Gómez 2023-04-28 11:33:28 -04:00 committed by GitHub
parent 255d5f377c
commit 1514333162
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -0,0 +1,4 @@
Significance: minor
Type: add
Remove AUTO-DRAFT in product name field on create new product page #37930

View File

@ -159,7 +159,7 @@ export function Edit() {
'woocommerce' 'woocommerce'
) } ) }
onChange={ setName } onChange={ setName }
value={ name || '' } value={ name && name !== AUTO_DRAFT_NAME ? name : '' }
onBlur={ setSkuIfEmpty } onBlur={ setSkuIfEmpty }
/> />
</BaseControl> </BaseControl>