Fix numeric select values not being passed as strings
[MAILPOET-4323]
This commit is contained in:
@@ -21,15 +21,15 @@ export function CookieSettings({ settingsPlacementKey }: Props): JSX.Element {
|
||||
value={formSettings.formPlacement[settingsPlacementKey].cookieExpiration}
|
||||
options={[
|
||||
{
|
||||
value: 0,
|
||||
value: '0',
|
||||
label: MailPoet.I18n.t('formPlacementCookieExpirationAlways'),
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
value: '1',
|
||||
label: MailPoet.I18n.t('formPlacementCookieExpirationDay'),
|
||||
},
|
||||
...cookieExpirationValues.map((cookieExpirationValue) => ({
|
||||
value: cookieExpirationValue,
|
||||
value: `${cookieExpirationValue}`,
|
||||
label: MailPoet.I18n.t('formPlacementCookieExpirationDays').replace(
|
||||
'%1s',
|
||||
cookieExpirationValue.toString(),
|
||||
|
@@ -83,7 +83,7 @@ export function FixedBarSettings(): JSX.Element {
|
||||
assocPath('formPlacement.fixedBar.delay', __, formSettings),
|
||||
])}
|
||||
options={delayValues.map((delayValue) => ({
|
||||
value: delayValue,
|
||||
value: `${delayValue}`,
|
||||
label: MailPoet.I18n.t('formPlacementDelaySeconds').replace(
|
||||
'%1s',
|
||||
`${delayValue}`,
|
||||
|
@@ -62,7 +62,7 @@ export function PopUpSettings(): JSX.Element {
|
||||
assocPath('formPlacement.popup.delay', __, formSettings),
|
||||
])}
|
||||
options={delayValues.map((delayValue) => ({
|
||||
value: delayValue,
|
||||
value: `${delayValue}`,
|
||||
label: MailPoet.I18n.t('formPlacementDelaySeconds').replace(
|
||||
'%1s',
|
||||
`${delayValue}`,
|
||||
|
@@ -83,7 +83,7 @@ export function SlideInSettings(): JSX.Element {
|
||||
assocPath('formPlacement.slideIn.delay', __, formSettings),
|
||||
])}
|
||||
options={delayValues.map((delayValue) => ({
|
||||
value: delayValue,
|
||||
value: `${delayValue}`,
|
||||
label: MailPoet.I18n.t('formPlacementDelaySeconds').replace(
|
||||
'%1s',
|
||||
`${delayValue}`,
|
||||
|
Reference in New Issue
Block a user