Skip to content

ci: add sort and hooks suites to the e2e tests matrix #12023

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Apr 10, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
revert previous commit
  • Loading branch information
GermanJablo committed Apr 10, 2025
commit a199b586a57b02ae85f2cad91731e6acd3cece06
17 changes: 0 additions & 17 deletions packages/ui/src/elements/Table/OrderableTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ import { toast } from 'sonner'
import { useListQuery } from '../../providers/ListQuery/index.js'
import { DraggableSortableItem } from '../DraggableSortable/DraggableSortableItem/index.js'
import { DraggableSortable } from '../DraggableSortable/index.js'
import { SortHeader } from '../SortHeader/index.js'
import { SortRow } from '../SortRow/index.js'
import { OrderableRow } from './OrderableRow.js'
import { OrderableRowDragPreview } from './OrderableRowDragPreview.js'

Expand Down Expand Up @@ -51,21 +49,6 @@ export const OrderableTable: React.FC<Props> = ({
)
}, [serverData])

if (columns[0]?.accessor !== '_dragHandle') {
columns.unshift({
accessor: '_dragHandle',
active: true,
field: {
admin: {
disabled: true,
},
hidden: true,
},
Heading: <SortHeader />,
renderedCells: initialData.map((_, i) => <SortRow key={i} />),
} as Column)
}

const activeColumns = columns?.filter((col) => col?.active)

if (
Expand Down
13 changes: 13 additions & 0 deletions packages/ui/src/utilities/renderTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,19 @@ export const renderTable = ({
}
}

columnsToUse.unshift({
accessor: '_dragHandle',
active: true,
field: {
admin: {
disabled: true,
},
hidden: true,
},
Heading: <SortHeader />,
renderedCells: docs.map((_, i) => <SortRow key={i} />),
} as Column)

return {
columnState,
// key is required since Next.js 15.2.0 to prevent React key error
Expand Down