Skip to content

[docs] components data table Sorting guide glitch #7054

@D50000

Description

@D50000

This is a documentation issue

At the document tutorial here
The code diff area display is miss some line, it suppose to be like this:

export function DataTable<TData, TValue>({
  columns,
  data,
}: DataTableProps<TData, TValue>) {
  const [sorting, setSorting] = React.useState<SortingState>([])
 
  const table = useReactTable({
    data,
    columns,
    getCoreRowModel: getCoreRowModel(),
    getPaginationRowModel: getPaginationRowModel(),
    onSortingChange: setSorting,
    getSortedRowModel: getSortedRowModel(),
    state: {
      sorting,
    },       //  Diff here this line also
  })

Not like this below:
Image

Affected component/components

table data

How to reproduce

https://ui.shadcn.com/docs/components/data-table#update-datatable-1

Codesandbox/StackBlitz link

No response

Logs

System Info

Any just document issue.

Before submitting

  • I've made research efforts and searched the documentation
  • I've searched for existing issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions