diff --git a/frontend/src/queries/nodes/DataTable/ColumnConfigurator/ColumnConfigurator.scss b/frontend/src/queries/nodes/DataTable/ColumnConfigurator/ColumnConfigurator.scss
index a6cf8cf5b3d5f..89ce0aff2b6ed 100644
--- a/frontend/src/queries/nodes/DataTable/ColumnConfigurator/ColumnConfigurator.scss
+++ b/frontend/src/queries/nodes/DataTable/ColumnConfigurator/ColumnConfigurator.scss
@@ -24,24 +24,11 @@
display: flex;
align-items: center;
justify-content: flex-start;
- padding: 0.5rem;
+ padding: 0 0.5rem;
overflow: hidden;
border-radius: var(--radius);
margin: calc(var(--radius) / 2) 0;
-
- &:hover {
- background-color: var(--mid);
- }
-
- &.disabled {
- cursor: not-allowed;
- color: var(--muted);
- background-color: var(--mid);
- }
-
- &.selected {
- background-color: var(--primary-bg-hover);
- }
+ background-color: var(--primary-bg-hover);
}
.selected-column-col {
@@ -56,23 +43,7 @@
padding-right: 0.25rem;
svg {
- transform: rotate(90deg) translateX(2px);
+ transform: rotate(90deg);
}
}
}
-
-.column-configurator-modal-sortable-container {
- z-index: 9999;
- display: flex;
- align-items: center;
- justify-content: flex-start;
- padding: 0.5rem;
- background-color: var(--primary-bg-hover);
-
- .drag-handle {
- color: var(--default);
- font-size: 1.2em;
- padding-right: 0.25rem;
- transform: rotate(90deg) translateX(2px);
- }
-}
diff --git a/frontend/src/queries/nodes/DataTable/ColumnConfigurator/ColumnConfigurator.tsx b/frontend/src/queries/nodes/DataTable/ColumnConfigurator/ColumnConfigurator.tsx
index 54c368f5c4ba4..b831f40740501 100644
--- a/frontend/src/queries/nodes/DataTable/ColumnConfigurator/ColumnConfigurator.tsx
+++ b/frontend/src/queries/nodes/DataTable/ColumnConfigurator/ColumnConfigurator.tsx
@@ -3,14 +3,7 @@ import { BindLogic, useActions, useValues } from 'kea'
import { LemonButton } from 'lib/lemon-ui/LemonButton'
import { dataTableLogic } from '~/queries/nodes/DataTable/dataTableLogic'
import { IconClose, IconEdit, IconTuning, SortableDragIcon } from 'lib/lemon-ui/icons'
-import clsx from 'clsx'
import { Tooltip } from 'lib/lemon-ui/Tooltip'
-import {
- SortableContainer as sortableContainer,
- SortableElement as sortableElement,
- SortableHandle as sortableHandle,
-} from 'react-sortable-hoc'
-import VirtualizedList, { ListRowProps } from 'react-virtualized/dist/es/List'
import { AutoSizer } from 'react-virtualized/dist/es/AutoSizer'
import { TaxonomicFilterGroupType } from 'lib/components/TaxonomicFilter/types'
import { useState } from 'react'
@@ -26,6 +19,10 @@ import { PropertyFilterType } from '~/types'
import { TeamMembershipLevel } from 'lib/constants'
import { RestrictedArea, RestrictedComponentProps, RestrictionScope } from 'lib/components/RestrictedArea'
import { LemonCheckbox } from 'lib/lemon-ui/LemonCheckbox'
+import { SortableContext, useSortable, verticalListSortingStrategy } from '@dnd-kit/sortable'
+import { restrictToParentElement, restrictToVerticalAxis } from '@dnd-kit/modifiers'
+import { DndContext } from '@dnd-kit/core'
+import { CSS } from '@dnd-kit/utilities'
let uniqueNode = 0
@@ -85,98 +82,17 @@ export function ColumnConfigurator({ query, setQuery }: ColumnConfiguratorProps)
}
function ColumnConfiguratorModal({ query }: ColumnConfiguratorProps): JSX.Element {
- // the virtualised list doesn't support gaps between items in the list
- // setting the container to be larger than we need
- // and adding a container with a smaller height to each row item
- // allows the new row item to set a margin around itself
- const rowContainerHeight = 36
- const rowItemHeight = 32
-
const { modalVisible, columns, saveAsDefault } = useValues(columnConfiguratorLogic)
const { hideModal, moveColumn, setColumns, selectColumn, unselectColumn, save, toggleSaveAsDefault } =
useActions(columnConfiguratorLogic)
- const DragHandle = sortableHandle(() => (
-
-