Skip to content

:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.

fix(data-table): keep "save as default" toggle visible in column configurator (#60241)

Christiaan Hendriksen3f9534a0baa7
diff --git a/frontend/src/queries/nodes/DataTable/ColumnConfigurator/ColumnConfigurator.tsx b/frontend/src/queries/nodes/DataTable/ColumnConfigurator/ColumnConfigurator.tsx
index 2b1ac21ee01f..9856807e4793 100644
--- a/frontend/src/queries/nodes/DataTable/ColumnConfigurator/ColumnConfigurator.tsx
+++ b/frontend/src/queries/nodes/DataTable/ColumnConfigurator/ColumnConfigurator.tsx
@@ -174,7 +174,7 @@ function ColumnConfiguratorModal({ query }: ColumnConfiguratorProps): JSX.Elemen
onClose={hideModal}
footer={
<>
- <div className="flex-1">
+ <div className="flex-1 flex flex-wrap items-center gap-2">
<LemonButton
type="secondary"
onClick={() =>
@@ -183,6 +183,21 @@ function ColumnConfiguratorModal({ query }: ColumnConfiguratorProps): JSX.Elemen
>
Reset to defaults
</LemonButton>
+ {showPersistedColumnReorder && query.showPersistentColumnConfigurator && (
+ <LemonCheckbox
+ label={
+ context?.type === 'groups'
+ ? 'Save as default columns for this group type'
+ : context?.type === 'event_definition'
+ ? 'Save as default columns for this event type'
+ : 'Save as default for all project members'
+ }
+ data-attr="events-table-save-columns-as-default-toggle"
+ checked={saveAsDefault}
+ onChange={toggleSaveAsDefault}
+ disabledReason={restrictionReason}
+ />
+ )}
</div>
<LemonButton type="secondary" onClick={hideModal}>
Close
@@ -255,23 +270,6 @@ function ColumnConfiguratorModal({ query }: ColumnConfiguratorProps): JSX.Elemen
</div>
</div>
</div>
- {showPersistedColumnReorder && query.showPersistentColumnConfigurator && (
- <LemonCheckbox
- label={
- context?.type === 'groups'
- ? 'Save as default columns for this group type'
- : context?.type === 'event_definition'
- ? 'Save as default columns for this event type'
- : 'Save as default for all project members'
- }
- className="mt-2"
- data-attr="events-table-save-columns-as-default-toggle"
- bordered
- checked={saveAsDefault}
- onChange={toggleSaveAsDefault}
- disabledReason={restrictionReason}
- />
- )}
</div>
</LemonModal>
)