Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React 19 #1618

Merged
merged 4 commits into from
Jan 24, 2025
Merged

React 19 #1618

merged 4 commits into from
Jan 24, 2025

Conversation

andersrognstad
Copy link
Contributor

No description provided.

@andersrognstad andersrognstad requested a review from a team as a code owner January 23, 2025 10:59
@@ -17,7 +17,7 @@ export const ExpandableBlockquote = ({
children,
}: ExpandableBlockquoteProps) => {
const [viewAll, setViewAll] = React.useState<boolean>(false);
const ref = React.useRef() as RefObject<any>;
const ref = React.useRef(null) as RefObject<any>;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{...props}
/>
);

export default React.forwardRef(DialogmoteKlokkeslett);
Copy link
Contributor Author

@andersrognstad andersrognstad Jan 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Denne er deprecated (https://imrankhani.medium.com/react-19-deprecated-forwardref-a-guide-to-passing-ref-as-a-standard-prop-7c0f13e6a229).
Det er react-hook-form som sender inn ref til disse komponentene der hvor de brukes og ref er nå en standard prop.

@@ -66,7 +66,7 @@ export const VelgBehandler = ({
</Radio>
))}
<Radio
value={undefined}
value=""
Copy link
Contributor Author

@andersrognstad andersrognstad Jan 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fikk en snodig bug her som en test fanget opp: undefined ble til verdien "on" når man valgte radioknappen, som gjorde at validering ikke feilet (fordi "on" ikke er falsy). Vi ønsker valideringsfeil når man har valgt radioknappen for "Søk etter behandler" uten å ha søkt opp behandler.

@andersrognstad andersrognstad merged commit 8a433a6 into master Jan 24, 2025
4 checks passed
@andersrognstad andersrognstad deleted the react19 branch January 24, 2025 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants