Skip to content

Commit

Permalink
Allow customizing restrictWidth and paddingSize of TableListView (
Browse files Browse the repository at this point in the history
#7691) (#7700)

* Allow customizing `restrictWidth` and `paddingSize` of `TableListView`

---------

(cherry picked from commit a360b38)

Signed-off-by: Miki <miki@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
  • Loading branch information
3 people committed Aug 15, 2024
1 parent 1f871aa commit 32c8ccf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions changelogs/fragments/7691.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
feat:
- Allow customizing `restrictWidth` and `paddingSize` of `TableListView` ([#7691](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/7691))
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import {
EuiCallOut,
EuiBasicTableColumn,
EuiText,
EuiPageProps,
} from '@elastic/eui';
import { HttpFetchError, ToastsStart } from 'opensearch-dashboards/public';
import { toMountPoint } from '../util';
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -559,7 +562,8 @@ class TableListView extends React.Component<TableListViewProps, TableListViewSta
<EuiPage
data-test-subj={this.props.entityName + 'LandingPage'}
className="itemListing__page"
restrictWidth
restrictWidth={this.props.restrictWidth}
paddingSize={this.props.paddingSize}
>
<EuiPageBody
component="main"
Expand Down

0 comments on commit 32c8ccf

Please sign in to comment.