[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 downloadLimitProps = { const downloadLimitInputProps = useNumberInputProps( {
...useNumberInputProps( {
value: downloadLimit, value: downloadLimit,
onChange: setDownloadLimit, onChange: setDownloadLimit,
} ), } );
const downloadLimitProps = {
value: downloadLimitInputProps.value,
onChange: downloadLimitInputProps.onChange,
id: useInstanceId( id: useInstanceId(
BaseControl, BaseControl,
'product_download_limit_field' 'product_download_limit_field'
@ -154,11 +157,14 @@ export function ManageDownloadLimitsModal( {
}, },
}; };
const downloadExpiryProps = { const downloadExpiryInputProps = useNumberInputProps( {
...useNumberInputProps( {
value: downloadExpiry, value: downloadExpiry,
onChange: setDownloadExpiry, onChange: setDownloadExpiry,
} ), } );
const downloadExpiryProps = {
value: downloadExpiryInputProps.value,
onChange: downloadExpiryInputProps.onChange,
id: useInstanceId( id: useInstanceId(
BaseControl, BaseControl,
'product_download_expiry_field' 'product_download_expiry_field'