nextui icon indicating copy to clipboard operation
nextui copied to clipboard

fix: remove disableAnimation prop from span element instead of img el…

Open kuri-sun opened this issue 6 months ago • 4 comments

Closes #

Im working on this linear issue: https://linear.app/nextui-inc/issue/ENG-1225/react-doesnt-recognize-disableanimation

📝 Description

[Cause of the error] The error says we need to remove disableAnimation prop from <span> element.

Screenshot 2024-08-02 at 11 36 31 PM

Currently we are trying to remove this prop from <img> element instead of <span>. So, I removed those lines of codes. The cause of this error is we did not extract disabledAnimation prop in useAvatar function's argument object de-structuring so that we accidentally passed disableAnimation to <span> element with otherProps.

[Solution] So, to avoid passing this prop to <span> element(which means we shall avoid including disableAnimation in otherProps), we added the object de-structuring as a solution for this.

⛳️ Current behavior (updates)

the error message in console

🚀 New behavior

Screenshot 2024-08-02 at 11 47 02 PM

Working as fine.

💣 Is this a breaking change (Yes/No):

No

📝 Additional Information

Summary by CodeRabbit

  • Improvements
    • Enhanced the handling of animation properties for better clarity and performance.
    • Simplified the logic for managing the animation control within the avatar component, leading to improved maintainability.
    • Filtered DOM properties to exclude unnecessary complexity, potentially improving overall performance.

kuri-sun avatar Aug 02 '24 14:08 kuri-sun