Skip to content

Commit

Permalink
🐛 Bruker id på fil i stedet for index
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasrognes committed Sep 27, 2023
1 parent 5fafd56 commit b56f744
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/aap-felles-react/src/FileInput/FileInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ export const FileInput = (props: FileInputProps) => {
<div className={'fileInput'} id={props.id}>
<Heading size={'medium'}>{heading}</Heading>
{ingress && <BodyShort>{ingress}</BodyShort>}
{files?.map((file, index) => {
{files?.map((file) => {
if (file.errorMessage) {
return (
<FilePanelError
file={file}
key={index}
key={file.id}
onDelete={() => {
setFiles(files.filter((fileInMap) => fileInMap.id !== file.id));
}}
Expand All @@ -95,7 +95,7 @@ export const FileInput = (props: FileInputProps) => {
return (
<FilePanelSuccess
file={file}
key={index}
key={file.id}
onDelete={() => {
setFiles(files.filter((fileInMap) => fileInMap.id !== file.id));
}}
Expand Down

0 comments on commit b56f744

Please sign in to comment.