Skip to content

Commit

Permalink
legg på open-prop og onclose så modal rendres (#1682)
Browse files Browse the repository at this point in the history
  • Loading branch information
idaame authored Mar 4, 2024
1 parent 30d09c0 commit 000b493
Showing 1 changed file with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,15 @@ const PåVentModal: React.FC<IProps> = ({ behandling, ventegrunn, onClose }) =>
ventegrunn.venteårsak === skjema.felter.årsak.verdi &&
ventegrunn.tidsfrist === skjema.felter.tidsfrist.verdi;

const lukkModal = () => {
tilbakestillFelterTilDefault();
onClose();
};

return (
<Modal
open
onClose={lukkModal}
header={{
heading: 'Behandling satt på vent',
size: 'medium',
Expand Down Expand Up @@ -130,15 +137,7 @@ const PåVentModal: React.FC<IProps> = ({ behandling, ventegrunn, onClose }) =>
>
Oppdater
</FTButton>
<FTButton
variant="tertiary"
key={'avbryt'}
onClick={() => {
tilbakestillFelterTilDefault();
onClose();
}}
size="small"
>
<FTButton variant="tertiary" key={'avbryt'} onClick={lukkModal} size="small">
Lukk
</FTButton>
</Modal.Footer>
Expand Down

0 comments on commit 000b493

Please sign in to comment.