From a360b38506a2665e76059534328c8a86c2449cb8 Mon Sep 17 00:00:00 2001 From: Miki Date: Tue, 13 Aug 2024 12:11:53 -0700 Subject: [PATCH] Allow customizing `restrictWidth` and `paddingSize` of `TableListView` (#7691) * Allow customizing `restrictWidth` and `paddingSize` of `TableListView` Signed-off-by: Miki * Changeset file for PR #7691 created/updated --------- Signed-off-by: Miki Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com> --- changelogs/fragments/7691.yml | 2 ++ .../public/table_list_view/table_list_view.tsx | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/7691.yml diff --git a/changelogs/fragments/7691.yml b/changelogs/fragments/7691.yml new file mode 100644 index 000000000000..e42b7eb3ce88 --- /dev/null +++ b/changelogs/fragments/7691.yml @@ -0,0 +1,2 @@ +feat: +- Allow customizing `restrictWidth` and `paddingSize` of `TableListView` ([#7691](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7691)) \ No newline at end of file diff --git a/src/plugins/opensearch_dashboards_react/public/table_list_view/table_list_view.tsx b/src/plugins/opensearch_dashboards_react/public/table_list_view/table_list_view.tsx index a472461e0e3c..3994bd3e4f7b 100644 --- a/src/plugins/opensearch_dashboards_react/public/table_list_view/table_list_view.tsx +++ b/src/plugins/opensearch_dashboards_react/public/table_list_view/table_list_view.tsx @@ -46,6 +46,7 @@ import { EuiCallOut, EuiBasicTableColumn, EuiText, + EuiPageProps, } from '@elastic/eui'; import { HttpFetchError, ToastsStart } from 'opensearch-dashboards/public'; import { toMountPoint } from '../util'; @@ -81,6 +82,8 @@ export interface TableListViewProps { * If the table is not empty, this component renders its own h1 element using the same id. */ headingId?: string; + restrictWidth?: boolean; + paddingSize?: EuiPageProps['paddingSize']; } export interface TableListViewState { @@ -559,7 +562,8 @@ class TableListView extends React.Component