Skip to content

Commit

Permalink
Bugfix finalform (#3640)
Browse files Browse the repository at this point in the history
* Revert "Reverterer endringer ifm finalform, som krasjet avdelingslederbildet for gamle køer"

This reverts commit c8740fd.

* default params
  • Loading branch information
vebnor authored Feb 4, 2025
1 parent c8740fd commit 975a069
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 34 deletions.
4 changes: 0 additions & 4 deletions src/client/app/form/finalFields/CheckboxField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,5 @@ const CheckboxField: FunctionComponent<OwnProps> = ({ name, label, validate, rea
/>
);

CheckboxField.defaultProps = {
validate: null,
readOnly: false,
};

export default CheckboxField;
14 changes: 3 additions & 11 deletions src/client/app/form/finalFields/DatepickerField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ interface OwnProps {
*/
const DatepickerField: FunctionComponent<OwnProps> = ({
name,
label,
label = '',
readOnly,
format,
parse,
format = (value) => value,
parse = (value) => value,
isEdited,
validate,
...otherProps
Expand All @@ -76,12 +76,4 @@ const DatepickerField: FunctionComponent<OwnProps> = ({
/>
);

DatepickerField.defaultProps = {
label: '',
readOnly: false,
isEdited: false,
format: (value) => value,
parse: (value) => value,
};

export default DatepickerField;
15 changes: 3 additions & 12 deletions src/client/app/form/finalFields/RadioOption.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ interface OwnProps {
*/

export const RadioOption: FunctionComponent<OwnProps> = ({
name,
className,
name = '',
className = '',
label,
value,
actualValue,
disabled,
groupDisabled,
onChange,
onChange = () => undefined,
children,
style,
manualHideChildren,
Expand All @@ -54,15 +54,6 @@ export const RadioOption: FunctionComponent<OwnProps> = ({
);
};

RadioOption.defaultProps = {
name: '',
className: '',
disabled: false,
groupDisabled: false,
onChange: () => undefined,
manualHideChildren: false,
};

RadioOption.displayName = 'RadioOption';

export default RadioOption;
4 changes: 0 additions & 4 deletions src/client/app/form/finalFields/ReadOnlyField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,5 @@ export const ReadOnlyField: FunctionComponent<OwnProps> = ({ label, input, isEdi
);
};

ReadOnlyField.defaultProps = {
label: undefined,
isEdited: false,
};

export default ReadOnlyField;
3 changes: 0 additions & 3 deletions src/client/app/form/finalFields/TextAreaField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@ const TextAreaWithBadge: FunctionComponent<TextAreaWithBadgeProps & WrappedCompo
</div>
);

TextAreaWithBadge.defaultProps = {
badges: null,
};

const renderNavTextArea = renderNavField(injectIntl(TextAreaWithBadge));

Expand Down

0 comments on commit 975a069

Please sign in to comment.