Skip to content

Commit

Permalink
fix(list): fix list item data-testid (#1710)
Browse files Browse the repository at this point in the history
  • Loading branch information
berber1016 authored Dec 21, 2021
1 parent ab7ed0a commit cdb66d6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/list/Item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const InnerItem = WithRef<HTMLLIElement, ItemProps>((props, ref?) => {
...rest,
};
if (model === 'multiple') {
return <CheckboxItem {...defaultProps} data-testid="list-item-checkbox" />;
return <CheckboxItem data-testid="list-item-checkbox" {...defaultProps} />;
}
if (model === 'cascader') {
return (
Expand All @@ -34,7 +34,7 @@ export const InnerItem = WithRef<HTMLLIElement, ItemProps>((props, ref?) => {
/>
);
}
return <BaseItem {...defaultProps} data-testid="list-item-base" />;
return <BaseItem data-testid="list-item-base" {...defaultProps} />;
});
const Item: React.ForwardRefExoticComponent<ItemProps & React.RefAttributes<HTMLLIElement>> & { isItem?: boolean } =
InnerItem;
Expand Down

1 comment on commit cdb66d6

@vercel
Copy link

@vercel vercel bot commented on cdb66d6 Dec 21, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.