Skip to content

Commit d5f707c

Browse files
committed
Fix compass-import-export to work around LG modal v20
1 parent 38759dd commit d5f707c

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

packages/compass-import-export/src/components/export-code-view.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ function ExportCodeView({
7878
data-testid="export-collection-code-preview-wrapper"
7979
id={codeElementId}
8080
language="javascript"
81+
// eslint-disable-next-line jsx-a11y/no-autofocus
82+
autoFocus={true}
8183
>
8284
{code}
8385
</Code>

packages/compass-import-export/src/components/export-modal.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ import type { ExportStatus, FieldsToExportOption } from '../modules/export';
3030
import type { RootExportState } from '../stores/export-store';
3131
import { SelectFileType } from './select-file-type';
3232
import { ExportSelectFields } from './export-select-fields';
33-
import { codeElementId, ExportCodeView } from './export-code-view';
33+
import { ExportCodeView } from './export-code-view';
3434
import type { ExportAggregation, ExportQuery } from '../export/export-types';
3535
import { queryHasProjection } from '../utils/query-has-projection';
3636
import { FieldsToExportOptions } from './export-field-options';
@@ -246,12 +246,7 @@ function ExportModal({
246246
}, [isOpen, resetExportFormState]);
247247

248248
return (
249-
<Modal
250-
open={isOpen}
251-
setOpen={closeExport}
252-
data-testid="export-modal"
253-
initialFocus={exportFullCollection ? undefined : `#${codeElementId}`}
254-
>
249+
<Modal open={isOpen} setOpen={closeExport} data-testid="export-modal">
255250
<ModalHeader
256251
title="Export"
257252
subtitle={aggregation ? `Aggregation on ${ns}` : `Collection ${ns}`}

0 commit comments

Comments
 (0)