Skip to content

docs(floating-actions): add row-selection pattern with DataTable#747

Open
paanSinghCoder wants to merge 11 commits intofeat/floating-actionsfrom
docs/floating-actions-datatable
Open

docs(floating-actions): add row-selection pattern with DataTable#747
paanSinghCoder wants to merge 11 commits intofeat/floating-actionsfrom
docs/floating-actions-datatable

Conversation

@paanSinghCoder
Copy link
Copy Markdown
Contributor

@paanSinghCoder paanSinghCoder commented Apr 21, 2026

Screenshot 2026-04-21 at 9 13 53 AM

Summary

  • Adds a "Row selection" section to DataTable docs showing how to integrate FloatingActions with TanStack row selection (leading checkbox column + useDataTable() + dismissible count chip wired to table.resetRowSelection()).
  • Ships a live DataTableSelectionDemo registered in the Demo scope so the pattern is visible in the docs, not just copy-pasted code.
  • Cross-reference added in the FloatingActions docs pointing at the new section.
  • Small DataTable fix: horizontal padding on .toolbar so filter/display controls align with cell content.

Test plan

  • Visit /components/datatable → scroll to "Row selection" — live demo renders, clicking checkboxes updates the "N selected" chip; dismissing clears selection.
  • Visit /components/floating-actions → see cross-reference at "Use with DataTable".
  • Confirm toolbar padding shift looks fine across other DataTable demos.

🤖 Generated with Claude Code

Adds a new "Row selection" section in the DataTable docs showing the
recommended pattern for integrating FloatingActions with TanStack row
selection:
- leading checkbox column wired via row.toggleSelected / getIsSelected
- SelectionBar that reads useDataTable().table.getSelectedRowModel()
- FloatingActions overlay with dismissible count chip
  (onDismiss → table.resetRowSelection)

Ships a live demo (DataTableSelectionDemo) registered in the Demo
scope, plus a cross-reference from the FloatingActions docs. Also
adds matching horizontal padding on DataTable's toolbar so filter /
display controls align with cell content.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
apsara Ready Ready Preview, Comment Apr 27, 2026 8:13am

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 21, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e75f7dfe-78b7-47ed-be39-8371d7bd06e2

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.


export const rowSelectionDemo = {
type: 'code',
code: `<DataTableSelectionDemo />`
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can use codePreview prop in the demo here to show the code directly in Markdown. Example here

That way we don't need to show the codeblock in .mdx file

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@rohanchkrabrty
Copy link
Copy Markdown
Contributor

@paanSinghCoder Also the selection state should be handled internally from the DataTable. Right now the user is supposed to handle the selection model, which is not ideal. Let's think this through separately

cc @ravisuhag

paanSinghCoder and others added 2 commits April 27, 2026 12:31
…context demo

- Collapse the separate ### Floating and ### Inline subsections into a
  single ## Variants section with a tabbed demo (matches the sidebar/
  navbar/tabs pattern).
- Floating tab is scoped to a 200px transform: translateZ(0) container
  so the bar pins to that area instead of the docs page.
- Scrolling-context demo: replace 20 dummy rows with a single dashed-
  border placeholder (sidebar precedent), make the scroll wrapper full
  width, drop the inner padding/border so rows go edge to edge.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…/floating-actions-datatable

# Conflicts:
#	apps/www/src/content/docs/components/floating-actions/index.mdx
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.

2 participants