fix(connections): disable sorting for close column

This commit is contained in:
kunish 2023-09-03 22:00:01 +08:00
parent b4739d6dba
commit 98b5d62c02
No known key found for this signature in database
GPG Key ID: 647A12B4F782C430

View File

@ -110,6 +110,7 @@ export default () => {
const columns: ColumnDef<ConnectionWithSpeed>[] = [ const columns: ColumnDef<ConnectionWithSpeed>[] = [
{ {
accessorKey: CONNECTIONS_TABLE_ACCESSOR_KEY.Close, accessorKey: CONNECTIONS_TABLE_ACCESSOR_KEY.Close,
enableSorting: false,
header: () => ( header: () => (
<div class="flex h-full items-center"> <div class="flex h-full items-center">
<Button <Button
@ -308,6 +309,7 @@ export default () => {
<td <td
onContextMenu={(e) => { onContextMenu={(e) => {
e.preventDefault() e.preventDefault()
typeof cell.renderValue() === 'string' &&
void writeClipboard(cell.renderValue() as string) void writeClipboard(cell.renderValue() as string)
}} }}
> >