Skip to content

Commit

Permalink
Bug/12565 dropdown in lag en ny logikkregel does not close after opti…
Browse files Browse the repository at this point in the history
…on selection (#13125)

* Used StudioDropdownMenu instead of DropdownMenu  to close the dropdown menu in expression
  • Loading branch information
JamalAlabdullah authored Jul 11, 2024
1 parent 441dc05 commit 6e5ac0d
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import React from 'react';
import { DropdownMenu } from '@digdir/design-system-react';
import { PlusIcon } from '@studio/icons';
import { useText } from '../../../../hooks';
import { StudioDropdownMenu } from '@studio/components';
Expand Down Expand Up @@ -48,7 +47,7 @@ const MenuItem = ({ property }: { property: FormItemProperty }) => {
await debounceSave(); // Todo: handleSave does not work here. Will probably be fixed by https://github.com/Altinn/altinn-studio/issues/12383.
};

return <DropdownMenu.Item onClick={handleAddExpression}>{text}</DropdownMenu.Item>;
return <StudioDropdownMenu.Item onClick={handleAddExpression}>{text}</StudioDropdownMenu.Item>;
};

const useAddExpressionText = (property: FormItemProperty) => {
Expand Down

0 comments on commit 6e5ac0d

Please sign in to comment.