Skip to content

Commit

Permalink
Merge branch 'main' into bytt-dropdown-med-actionmenu
Browse files Browse the repository at this point in the history
  • Loading branch information
tu55eladd committed Jan 9, 2025
2 parents 23490db + 8975a12 commit 5583de5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { PlusIcon } from '@navikt/aksel-icons';
import { ActionMenu, Button, Dropdown } from '@navikt/ds-react';
import { ActionMenu, Button } from '@navikt/ds-react';
import React from 'react';
import { useSelector } from 'react-redux';
import { Link } from 'react-router-dom';
Expand Down Expand Up @@ -56,7 +56,6 @@ const LeggTilNyttAktivitetsKort = () => {
<ActionMenu>
<ActionMenu.Trigger>
<Button
// as={Dropdown.Toggle}
loading={[Status.RELOADING, Status.PENDING].includes(aktivitetStatus)}
className="relative w-full"
icon={<PlusIcon role="img" aria-hidden fontSize="1.5rem" />}
Expand All @@ -68,7 +67,6 @@ const LeggTilNyttAktivitetsKort = () => {
<ActionMenu.Content>
{menuItemsGroup.map((item, index) => (
<ActionMenu.Group key={item.groupTittel} label={item.groupTittel}>
{/*<Dropdown.Menu.GroupedList.Heading>{item.groupTittel}</Dropdown.Menu.GroupedList.Heading>*/}
{item.groupedItems.map((subItem) => (
<ActionMenu.Item as={Link} to={subItem.link} key={subItem.tittle}>
{subItem.tittle}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ const AktivitetStatusForm = (props: Props) => {

const { setFormIsDirty } = useContext(DirtyContext);

useEffect(() => {
setValue('aktivitet', aktivitet);
}, [aktivitet]);

useEffect(() => {
setFormIsDirty('status', isDirty);
return () => {
Expand Down

0 comments on commit 5583de5

Please sign in to comment.