Skip to content

Commit

Permalink
chore: InputFile内のloopに設定するkeyの値を調整
Browse files Browse the repository at this point in the history
  • Loading branch information
AtsushiM committed Jan 15, 2025
1 parent 0528a2a commit 635feb2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/smarthr-ui/src/components/InputFile/InputFile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export type Props = VariantProps<typeof inputFile> & {
type ElementProps = Omit<ComponentPropsWithRef<'input'>, keyof Props>

const DESTROY_BUTTON_TEXT = '削除'
const BASE_COLUMN_PADDING = { block: 0.5, inline: 1 }
const BASE_COLUMN_PADDING = { block: 0.5, inline: 1 } as const

export const InputFile = forwardRef<HTMLInputElement, Props & ElementProps>(
(
Expand Down Expand Up @@ -180,7 +180,7 @@ export const InputFile = forwardRef<HTMLInputElement, Props & ElementProps>(
{!disabled && hasFileList && files.length > 0 && (
<BaseColumn as="ul" padding={BASE_COLUMN_PADDING} className={fileListStyle}>
{files.map((file, index) => (
<li key={`${file.name}-${index}`} className={fileItemStyle}>
<li key={index} className={fileItemStyle}>
<span className="smarthr-ui-InputFile-fileName">{file.name}</span>
<Button
variant="text"
Expand Down

0 comments on commit 635feb2

Please sign in to comment.