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