Skip to content

Commit

Permalink
support data attributes for easier list targeting
Browse files Browse the repository at this point in the history
  • Loading branch information
jonesmac committed Jan 28, 2025
1 parent 24ed304 commit d7dfbcd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/animation/src/AnimatedList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,15 @@ export const AnimatedList: React.FC<AnimatedListProps> = ({
>
{items?.[0]?.child}
</div>
{transitions((styles, item) => (
{transitions((styles, item, _transition, index) => (
<animated.div
style={{
...itemStyles, ...(fullWidth ? { width: '100%' } : {}), ...styles,
}}
key={item?.key}
data-animated-list-item-key={item?.key}
data-animated-list-index={index}

>
{item?.child}
</animated.div>
Expand Down

0 comments on commit d7dfbcd

Please sign in to comment.