Examples
Editing CRUD Tree Example
An example of Shadcn Table which shows how to use editing CRUD features with expanding sub rows
Editing nested row data can be challenging. In this example, rows can be expanded to show sub rows, and editing and creating new rows can be done at any level.
Adding a new blank row in the exact row index position is now possible with the new positionCreatingRow table option.
This example also shows some complex client-side optimistic updates, where the table data is updated immediately after a valid user action.
Try it
- Click the arrow on row
1. Its sub-rows hide. - Click
Add Subordinateon row2. An empty row opens right under it.