Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Use filterEmptyItem for table columns to improve readability. #2815

Merged
merged 1 commit into from
Nov 6, 2024

Commits on Nov 6, 2024

  1. refactor: Use filterEmptyItem for table columns to improve readabil…

    …ity. (#2815)
    
    Refactored image list column definitions to use conditional expressions with filterEmptyItem
    
    This PR simplifies the column definitions in CustomizedImageList and ImageList components by:
    - Replacing spread operator and conditional arrays with boolean expressions
    - Using filterEmptyItem to remove falsy column definitions
    - Maintaining the same functionality while reducing code complexity
    
    **Checklist:**
    - [ ] Documentation
    - [ ] Test case(s) to demonstrate the difference of before/after
    
    The changes make the code more maintainable by:
    1. Eliminating nested conditional arrays
    2. Making column visibility logic more explicit
    3. Keeping column definitions flat and easier to read
    
    The functionality remains identical for users, with no changes to the UI or behavior.
    agatha197 committed Nov 6, 2024
    Configuration menu
    Copy the full SHA
    f758c59 View commit details
    Browse the repository at this point in the history