Skip to content

KomposeTable 0.0.2

Choose a tag to compare

@stephenWanjala stephenWanjala released this 10 Sep 12:32
· 3 commits to master since this release
d9dbb4a

KomposeTable Release Notes (Version 0.0.2)

KomposeTable 0.0.2, brings significant enhancements to customization, stability, and ease of use for Compose Multiplatform tables!

Key New Features & Improvements:

  • Introducing KomposeTableState for Centralized Configuration:
    • Table configuration (e.g., enableSorting, outlinedTable, dividerThickness, columnResizeMode) is now managed by a KomposeTableState object, which can be created and remembered using rememberKomposeTableState(). This allows for a more organized and state-retaining approach to table settings, even across configuration changes.
    • KomposeTableState is now saveable, meaning your table's configuration will persist across process restarts (e.g., on Android when the app is backgrounded).
  • Enhanced Column Definition with TableSortColumn:
    • The TableColumn class has been renamed to TableSortColumn and now explicitly includes a valueExtractor lambda. This provides a type-safe, reflection-free way to define how data should be extracted from your data class for display and sorting, significantly improving performance and reliability.
  • Improved Column Resizing in CONSTRAINED Mode:
    • The CONSTRAINED column resize mode now intelligently distributes any extra available table width among visible columns, ensuring that the table always fills its allocated space while maintaining the relative proportions of resized columns.
  • New Built-in Material Icons:
    • Custom ArrowDropDown and KeyboardArrowUp icons have been integrated directly into the library, removing the dependency on material-icons-extended and reducing library size.
  • Gradle Plugin Updates and Dependency Cleanup:
    • Updated Gradle plugin versions for compose.compiler, composeMultiplatform, and kotlinMultiplatform.
    • Removed kotlin-plugin-serialization and kotlinx-serialization-json dependencies from the komposetable module, as data extraction is now handled by the valueExtractor lambda.
    • Removed material-icons-extended dependency.
  • New Sample Module:
    • A dedicated sample module has been added, demonstrating how to use KomposeTable with a practical example of a Football League Table. This will make it easier for developers to get started and understand the component's features.
  • Documentation Updates:
    • The README.md has been updated to reflect the new valueExtractor feature, add a note about the sample module, and clarify existing features.
    • Added a "Maven Central Version" badge to the README.
    • Added a TODO section for future documentation and examples.

Breaking Changes (for users upgrading from 0.0.1):

  • TableColumn is now TableSortColumn: You will need to update your column definitions.
  • valueExtractor is now required for TableSortColumn: Instead of relying on reflection with id to extract values, you must provide a valueExtractor lambda.
  • Table Configuration Moved to KomposeTableState: Direct parameters like enableSorting, outlinedTable, alternatingRowColors, etc., have been removed from the KomposeTable composable. You now pass a KomposeTableState object.
  • Removed kotlinx-serialization-json dependency: If your project relied on this transitively through komposetable, you might need to add it explicitly if still required.

Full Changelog: 0.0.1...0.0.2