diff --git a/.changeset/wicked-badgers-sniff.md b/.changeset/wicked-badgers-sniff.md new file mode 100644 index 0000000000..b8938aa5c0 --- /dev/null +++ b/.changeset/wicked-badgers-sniff.md @@ -0,0 +1,5 @@ +--- +'@nhost/dashboard': patch +--- + +fix: resolve an issue where the checkbox in the data-grid header did not select all rows diff --git a/dashboard/src/components/dataGrid/DataGridHeader/DataGridHeader.tsx b/dashboard/src/components/dataGrid/DataGridHeader/DataGridHeader.tsx index 73d9cdd354..68efbe1e07 100644 --- a/dashboard/src/components/dataGrid/DataGridHeader/DataGridHeader.tsx +++ b/dashboard/src/components/dataGrid/DataGridHeader/DataGridHeader.tsx @@ -96,45 +96,52 @@ export default function DataGridHeader({ }} key={column.id} > - + {column.id === 'selection' ? ( {column.render('Header')} - - {allowSort && ( - - {column.isSorted && !column.isSortedDesc && ( - - )} - - {column.isSorted && column.isSortedDesc && ( - - )} - - )} - - {allowResize && !column.disableResizing && ( + ) : ( + event.stopPropagation(), - })} - className="absolute top-0 bottom-0 -right-0.5 z-10 h-full w-1.5 group-hover:bg-slate-900 group-hover:bg-opacity-20 group-active:bg-slate-900 group-active:bg-opacity-20 motion-safe:transition-colors" - /> - )} - + {...headerProps} + className="relative grid w-full grid-flow-col items-center justify-between p-2" + > + {column.render('Header')} + + {allowSort && ( + + {column.isSorted && !column.isSortedDesc && ( + + )} + + {column.isSorted && column.isSortedDesc && ( + + )} + + )} + + + {allowResize && !column.disableResizing && ( + event.stopPropagation(), + })} + className="absolute -right-0.5 bottom-0 top-0 z-10 h-full w-1.5 group-hover:bg-slate-900 group-hover:bg-opacity-20 group-active:bg-slate-900 group-active:bg-opacity-20 motion-safe:transition-colors" + /> + )} + + )}