Skip to content

Commit

Permalink
Merge pull request KelvinTegelaar#2294 from Ren-Roros-Digital/Fix-def…
Browse files Browse the repository at this point in the history
…aultValue

Fix Number defaultValue
  • Loading branch information
JohnDuprey committed Apr 3, 2024
2 parents a61438f + f1934da commit 0faf5d5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/components/forms/RFFComponents.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,11 @@ export const RFFCFormInput = ({
spellCheck = true,
autoFocus = false,
hiddenValue,
defaultValue,
onChange,
}) => {
return (
<Field initialValue={hiddenValue} name={name} validate={validate}>
<Field defaultValue={defaultValue} initialValue={hiddenValue} name={name} validate={validate}>
{({ input, meta }) => {
const handleChange = onChange
? (e) => {
Expand Down
12 changes: 8 additions & 4 deletions src/data/standards.json
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,8 @@
{
"type": "number",
"name": "standards.NudgeMFA.snoozeDurationInDays",
"label": "Number of days to allow users to skip registering Authenticator (0-14, default is 1)"
"label": "Number of days to allow users to skip registering Authenticator (0-14, default is 1)",
"default": 1
}
],
"label": "Sets the state for the request to setup Authenticator",
Expand Down Expand Up @@ -542,7 +543,8 @@
"type": "number",
"name": "standards.EnableMailTips.MailTipsLargeAudienceThreshold",
"label": "Number of recipients to trigger the large audience MailTip (Default is 25)",
"placeholder": "Enter a profile name"
"placeholder": "Enter a profile name",
"default": 25
}
],
"label": "Enable all MailTips",
Expand Down Expand Up @@ -598,12 +600,14 @@
{
"type": "number",
"name": "standards.SendReceiveLimitTenant.SendLimit",
"label": "Send limit in MB (Default is 35)"
"label": "Send limit in MB (Default is 35)",
"default": 35
},
{
"type": "number",
"name": "standards.SendReceiveLimitTenant.ReceiveLimit",
"label": "Receive Limit in MB (Default is 36)"
"label": "Receive Limit in MB (Default is 36)",
"default": 36
}
],
"label": "Set send/receive size limits",
Expand Down
2 changes: 1 addition & 1 deletion src/views/tenant/standards/ListAppliedStandards.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ const ApplyNewStandard = () => {
className="mb-3"
name={component.name}
label={component.label}
hiddenValue={component.default ?? 0}
defaultValue={component.default}
/>
)}
{component.type === 'boolean' && (
Expand Down

0 comments on commit 0faf5d5

Please sign in to comment.