Skip to main content

Example: Dialog table

<Dialog open={open} onOpenChange={setOpen}>
<DialogContent className="flex h-[80vh] flex-col">
<DialogHeader>
<DialogTitle>Select records</DialogTitle>
</DialogHeader>
<DataTable
columns={columns}
source={{ type: "server", options: { fetch, queryKey: ["picker", "list"] } }}
disableParamPersistence
fillHeight
enableToolbar
enablePagination
enableRowSelection
onSelectionChange={setSelected}
/>
</DialogContent>
</Dialog>

disableParamPersistence keeps dialog state out of the page URL. fillHeight centers loading/empty states in the remaining space.