Skip to content

Commit

Permalink
fix: use LineItem id as a uniq key
Browse files Browse the repository at this point in the history
  • Loading branch information
marcomontalbano committed Aug 14, 2023
1 parent f8aea66 commit 3515f01
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/app-elements/src/ui/resources/LineItems.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ export const LineItems = withSkeletonTemplate<{
const isEditable = editable && lineItem.type === 'line_items'

return (
<Fragment key={`${lineItem.type}-${code}`}>
<Fragment key={lineItem.id}>
<tr className='h-0'>
<td
className={cn('w-0', {
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/src/stories/resources/LineItem.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const Default = Template.bind({})
Default.args = {
preset: ['custom'],
isLoading: false,
items: [presetLineItems.oneLine],
items: [{ ...presetLineItems.oneLine, id: 'nIp9785zse' }],
footer,
onChange() {
alert('Something has changed!')
Expand Down

0 comments on commit 3515f01

Please sign in to comment.