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

IS-2690: Avoid navigation sync, when other window navigates to enkelt… #518

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 16 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"@navikt/ds-css": "7.0.0",
"@navikt/ds-react": "7.0.0",
"@navikt/fnrvalidator": "1.3.0",
"@navikt/navspa": "3.0.1",
"@tanstack/react-query": "4.22.0",
"@tanstack/react-query-devtools": "4.22.0",
"@types/connect-redis": "0.0.19",
Expand Down Expand Up @@ -105,6 +104,7 @@
"@babel/preset-env": "7.24.8",
"@babel/preset-react": "7.24.7",
"@babel/preset-typescript": "7.24.7",
"@navikt/navspa": "6.0.1",
"@styled/typescript-styled-plugin": "1.0.1",
"@tanstack/eslint-plugin-query": "4.29.9",
"@testing-library/dom": "10.3.2",
Expand Down
2 changes: 2 additions & 0 deletions src/decorator/decoratorConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ const decoratorConfig = (
setFnr(fnr);
}
},
fnrSyncMode: 'writeOnly',
enhetSyncMode: 'writeOnly',
showEnheter: true,
showSearchArea: true,
showHotkeys: false,
Expand Down
2 changes: 2 additions & 0 deletions src/decorator/decoratorProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ export interface DecoratorProps {
fetchActiveUserOnMount?: boolean | undefined; // Om fnr er undefined fra container appen, og denne er satt til true for at den skal hente siste aktiv fnr.
onEnhetChanged: (enhetId?: string | null, enhet?: Enhet) => void; // Kalles når enheten endres
onFnrChanged: (fnr?: string | null) => void; // Kalles når fnr enheten endres
fnrSyncMode: 'sync' | 'writeOnly'; // Modus til fnr state management. "sync" er default. "writeOnly" gjør at endringer aldri hentes men vil settes dersom det oppdateres lokalt i appen
enhetSyncMode?: 'sync' | 'writeOnly'; // Samme som fnrSyncMode, men for enhet state.
onLinkClick?: (link: { text: string; url: string }) => void; // Kan brukes for å legge til callbacks ved klikk på lenker i menyen. Merk at callbacken ikke kan awaites og man må selv håndtere at siden lukkes. Nyttig for å f.eks tracke navigasjon events i amplitude
appName: string; // Navn på applikasjonen
hotkeys?: Hotkey[]; // Konfigurasjon av hurtigtaster
Expand Down