Updating your copy
shadcn add copies this block's source into your project — after that,
the code is yours, and upstream releases don't reach it automatically.
This page is the manual update path.
Know what you have
Every release stamps its version into the registry item. When you
install, note the meta.version of
/r/data-table.json somewhere in your project
(a comment, your PR description). The
changelog
lists what changed in each version.
Update recipe
-
Start from a clean branch.
-
Re-run the install command with
--overwrite:npx shadcn@latest add --overwrite <registry-url>/r/data-table.json -
Review the diff. Everything under
components/ui/data-table/is replaced with the new upstream source —git diffshows upstream changes mixed with the loss of any local edits you made. -
Re-apply your local edits on top, or cherry-pick hunks with
git checkout -pagainst the pre-update commit. -
Check the changelog for entries marked as breaking and adjust your usage.
Keep local edits separate
The less you edit the copied files directly — prefer wrapping the
table or using the many render* slots — the closer step 3's diff is
to a pure upstream update.