[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:
parent
f24af0e197
commit
f36ce5b3f1
|
@ -0,0 +1,4 @@
|
||||||
|
Significance: patch
|
||||||
|
Type: fix
|
||||||
|
|
||||||
|
[Product Block Editor]: fix Input control issue in Manage download limit form
|
|
@ -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'
|
||||||
|
|
Loading…
Reference in New Issue