Skip to content

fix(react): table selection bugs, list semantics, loader redesign, button fix#86

Merged
wangdicoder merged 5 commits intomasterfrom
fix/table-selection-types
Mar 28, 2026
Merged

fix(react): table selection bugs, list semantics, loader redesign, button fix#86
wangdicoder merged 5 commits intomasterfrom
fix/table-selection-types

Conversation

@wangdicoder
Copy link
Copy Markdown
Owner

@wangdicoder wangdicoder commented Mar 28, 2026

Summary

Table

  • Replace native <input> with Checkbox and Radio components for consistent styling
  • Fix pagination index bug where page-relative indices caused row key collisions on page 2+
  • Fix handleSelectRow filtering against unsorted dataSource instead of sortedData
  • Add missing columns dependency to defaultSortOrder effect
  • Use paginationConfig for proper type narrowing in handlePageChange
  • Constrain ColumnType.dataIndex to keyof T & string
  • Change RowSelection from type alias to interface; remove unused fixed prop
  • Document missing props: rowClassName, onRow, defaultSortOrder, className

List

  • Use semantic <ul>/<li> elements instead of <div> for list items
  • Add forwardRef to ListItemMeta; extend props with div intrinsic attributes
  • Fix renderItem index to use global index when paginated
  • Add aria-busy, role="status", and aria-live attributes
  • Preserve generic type T through List export

Loader

  • Replace dot-based indicator with CSS-only spinning border animation
  • Remove 4 dot <span> elements, use single <div> with ::before/::after
  • Use CSS custom property --ty-loader-border-width for size variants

Button

  • Add flex-shrink: 0 to icon container to prevent shrinking in flex layout

useVirtualScroll

  • Add enabled option to skip scroll tracking when not in virtual mode

Release

  • Bump: minor
  • Affected packages: @tiny-design/react

Test plan

  • Verify table renders with Checkbox/Radio components instead of native inputs
  • Test row selection with pagination and sorting
  • Verify List renders as <ul>/<li> in DOM
  • Verify Loader spinner animation renders correctly at all sizes
  • Verify button icon doesn't shrink when in flex container
  • Run pnpm test — all tests pass

🤖 Generated with Claude Code

…e types

- Replace native <input> with Checkbox and Radio components for consistent styling
- Fix pagination index bug where page-relative indices caused key collisions
- Fix handleSelectRow filtering against unsorted dataSource
- Add columns to defaultSortOrder effect dependency array
- Use paginationConfig for proper type narrowing in handlePageChange
- Constrain ColumnType.dataIndex to keyof T & string
- Change RowSelection from type alias to interface
- Remove unused fixed prop from ColumnType
- Document missing props (rowClassName, onRow, defaultSortOrder, className)
…on icon shrink

List:
- Use semantic <ul>/<li> elements instead of <div> for list items
- Add forwardRef to ListItemMeta
- Extend ListItemMetaProps with div intrinsic props
- Change ListItemProps to extend <li> intrinsic elements
- Fix renderItem index to use global index when paginated
- Add aria-busy, role="status", and aria-live attributes
- Preserve generic type T through List export

Loader:
- Replace dot-based indicator with CSS-only spinning border animation
- Remove 4 dot spans, use single div with ::before/::after pseudo-elements
- Use CSS custom property --ty-loader-border-width for size variants
- Simplify SCSS by removing size-specific nested selectors

Button:
- Add flex-shrink: 0 to icon container to prevent shrinking
- Shorten loading demo button labels

useVirtualScroll:
- Add enabled option to skip scroll tracking when not in virtual mode
@wangdicoder wangdicoder changed the title fix(table): use Checkbox/Radio components, fix selection bugs, improve types fix(react): table selection bugs, list semantics, loader redesign, button fix Mar 28, 2026
@wangdicoder wangdicoder merged commit 6ff73db into master Mar 28, 2026
1 check passed
@wangdicoder wangdicoder deleted the fix/table-selection-types branch March 28, 2026 23:57
@github-actions github-actions bot mentioned this pull request Mar 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant