[Product Block Editor]: fix Input control issue in Manage download limit form (#41796)

* do not destructure number input props

* changelog
This commit is contained in:
Damián Suárez 2023-11-29 18:18:48 -03:00 committed by GitHub
parent f24af0e197
commit f36ce5b3f1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 8 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: fix
[Product Block Editor]: fix Input control issue in Manage download limit form

View File

@ -122,11 +122,14 @@ export function ManageDownloadLimitsModal( {
return true; return true;
} }
const downloadLimitInputProps = useNumberInputProps( {
value: downloadLimit,
onChange: setDownloadLimit,
} );
const downloadLimitProps = { const downloadLimitProps = {
...useNumberInputProps( { value: downloadLimitInputProps.value,
value: downloadLimit, onChange: downloadLimitInputProps.onChange,
onChange: setDownloadLimit,
} ),
id: useInstanceId( id: useInstanceId(
BaseControl, BaseControl,
'product_download_limit_field' 'product_download_limit_field'
@ -154,11 +157,14 @@ export function ManageDownloadLimitsModal( {
}, },
}; };
const downloadExpiryInputProps = useNumberInputProps( {
value: downloadExpiry,
onChange: setDownloadExpiry,
} );
const downloadExpiryProps = { const downloadExpiryProps = {
...useNumberInputProps( { value: downloadExpiryInputProps.value,
value: downloadExpiry, onChange: downloadExpiryInputProps.onChange,
onChange: setDownloadExpiry,
} ),
id: useInstanceId( id: useInstanceId(
BaseControl, BaseControl,
'product_download_expiry_field' 'product_download_expiry_field'