Skip to content

Commit

Permalink
[docs] Fix EuiDataGrid not correctiny loading pagination @defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
cee-chen committed Jul 26, 2023
1 parent 22964d2 commit 8c72ddd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ const inMemorySortingDataGridSource = require('!!raw-loader!./in_memory_sorting'

import {
EuiDataGridColumn,
EuiDataGridPaginationProps,
EuiDataGridSorting,
EuiDataGridInMemory,
EuiDataGridStyle,
Expand All @@ -32,6 +31,7 @@ import {
EuiDataGridCellValueElementProps,
EuiDataGridSchemaDetector,
} from '!!prop-loader!../../../../../src/components/datagrid/data_grid_types';
import { EuiDataGridPaginationProps } from '../basics/_props';

export const DataGridMemoryExample = {
sections: [
Expand Down
12 changes: 10 additions & 2 deletions src-docs/src/views/datagrid/basics/_props.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import React from 'react';
import { EuiDataGrid } from '../../../../../src/components';
import React, { FunctionComponent } from 'react';
import {
EuiDataGrid,
EuiDataGridPaginationProps as _EuiDataGridPaginationProps,
} from '../../../../../src/components';

import { DataGridPropsTable } from '../_props_table';
import { gridSnippets } from '../_snippets';
Expand Down Expand Up @@ -41,3 +44,8 @@ export const DataGridTopProps = () => {
/>
);
};

// Loading `EuiDataGridPaginationProps` via !prop-loader doesn't correctly inherit @defaults
export const EuiDataGridPaginationProps: FunctionComponent<
_EuiDataGridPaginationProps
> = () => <div />;
3 changes: 1 addition & 2 deletions src-docs/src/views/datagrid/basics/datagrid_example.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {
} from '../../../../../src/components';

import DataGrid from './datagrid';
import { DataGridTopProps } from './_props';
import { DataGridTopProps, EuiDataGridPaginationProps } from './_props';
const dataGridSource = require('!!raw-loader!./datagrid');

import DataGridContainer from './container';
Expand All @@ -28,7 +28,6 @@ const dataGridVirtualizationConstrainedSource = require('!!raw-loader!./virtuali
import {
EuiDataGridColumn,
EuiDataGridColumnCellAction,
EuiDataGridPaginationProps,
EuiDataGridSorting,
EuiDataGridInMemory,
EuiDataGridStyle,
Expand Down

0 comments on commit 8c72ddd

Please sign in to comment.