Skip to content

Commit

Permalink
[docs] Fix EuiBasicTable/EuiInMemoryTable props tabs not correctly lo…
Browse files Browse the repository at this point in the history
…ading `@default`s
  • Loading branch information
cee-chen committed Jul 26, 2023
1 parent 0a18b85 commit 22964d2
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src-docs/src/views/tables/basic/basic_section.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
Criteria,
CriteriaWithPagination,
} from '!!prop-loader!../../../../../src/components/basic_table/basic_table';
import { Pagination } from '!!prop-loader!../../../../../src/components/basic_table/pagination_bar';
import { Pagination } from '../paginated/_props';
import {
EuiTableFieldDataColumnType,
EuiTableComputedColumnType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
Criteria,
CriteriaWithPagination,
} from '!!prop-loader!../../../../../src/components/basic_table/basic_table';
import { Pagination } from '!!prop-loader!../../../../../src/components/basic_table/pagination_bar';
import { Pagination } from '../paginated/_props';
import {
EuiTableFieldDataColumnType,
EuiTableComputedColumnType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
Criteria,
CriteriaWithPagination,
} from '!!prop-loader!../../../../../src/components/basic_table/basic_table';
import { Pagination } from '!!prop-loader!../../../../../src/components/basic_table/pagination_bar';
import { Pagination } from '../paginated/_props';
import {
EuiTableFieldDataColumnType,
EuiTableComputedColumnType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
Criteria,
CriteriaWithPagination,
} from '!!prop-loader!../../../../../src/components/basic_table/basic_table';
import { Pagination } from '!!prop-loader!../../../../../src/components/basic_table/pagination_bar';
import { Pagination } from '../paginated/_props';
import {
EuiTableFieldDataColumnType,
EuiTableComputedColumnType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
Criteria,
CriteriaWithPagination,
} from '!!prop-loader!../../../../../src/components/basic_table/basic_table';
import { Pagination } from '!!prop-loader!../../../../../src/components/basic_table/pagination_bar';
import { Pagination } from '../paginated/_props';
import {
EuiTableFieldDataColumnType,
EuiTableComputedColumnType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
Criteria,
CriteriaWithPagination,
} from '!!prop-loader!../../../../../src/components/basic_table/basic_table';
import { Pagination } from '!!prop-loader!../../../../../src/components/basic_table/pagination_bar';
import { Pagination } from '../paginated/_props';
import {
EuiTableFieldDataColumnType,
EuiTableComputedColumnType,
Expand Down
2 changes: 1 addition & 1 deletion src-docs/src/views/tables/in_memory/in_memory_section.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
Criteria,
CriteriaWithPagination,
} from '!!prop-loader!../../../../../src/components/basic_table/basic_table';
import { Pagination } from '!!prop-loader!../../../../../src/components/basic_table/pagination_bar';
import { Pagination } from '../paginated/_props';
import {
EuiTableFieldDataColumnType,
EuiTableComputedColumnType,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
Criteria,
CriteriaWithPagination,
} from '!!prop-loader!../../../../../src/components/basic_table/basic_table';
import { Pagination } from '!!prop-loader!../../../../../src/components/basic_table/pagination_bar';
import { Pagination } from '../paginated/_props';
import {
EuiTableFieldDataColumnType,
EuiTableComputedColumnType,
Expand Down
6 changes: 6 additions & 0 deletions src-docs/src/views/tables/paginated/_props.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import React, { FunctionComponent } from 'react';

import { Pagination as _Pagination } from '../../../../../src/components/basic_table/pagination_bar';

// Loading `Pagination` directly via !prop-loader doesn't correctly inherit @defaults
export const Pagination: FunctionComponent<_Pagination> = () => <div />;
6 changes: 6 additions & 0 deletions src/components/basic_table/in_memory_table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,13 @@ type InMemoryTableProps<T> = Omit<
* Configures #Search.
*/
search?: Search;
/**
* Configures #Pagination
*/
pagination?: undefined;
/**
* Configures #EuiTableSortingType
*/
sorting?: Sorting;
/**
* Set `allowNeutralSort` to false to force column sorting. Defaults to true.
Expand Down

0 comments on commit 22964d2

Please sign in to comment.