From c8ca9ad4ce9fb8dbc363de9769a3655754c8e487 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 13 Aug 2024 19:13:30 +0000 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> (cherry picked from commit a360b38506a2665e76059534328c8a86c2449cb8) Signed-off-by: github-actions[bot] --- 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 00000000000..e42b7eb3ce8 --- /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 a472461e0e3..3994bd3e4f7 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