Skip to content

Commit

Permalink
IS-2690: Avoid navigation sync, when other window navigates to enkelt…
Browse files Browse the repository at this point in the history
…person sykmeldt
  • Loading branch information
vetlesolgaard committed Oct 8, 2024
1 parent bb62e5c commit 5f41a2b
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 12 deletions.
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

0 comments on commit 5f41a2b

Please sign in to comment.