Skip to content

Commit

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

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

Signed-off-by: Miki <[email protected]>

* Changeset file for PR opensearch-project#7691 created/updated

---------

Signed-off-by: Miki <[email protected]>
Co-authored-by: opensearch-changeset-bot[bot] <154024398+opensearch-changeset-bot[bot]@users.noreply.github.com>
  • Loading branch information
AMoo-Miki and opensearch-changeset-bot[bot] authored Aug 13, 2024
1 parent 65ecd3b commit a360b38
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 a360b38

Please sign in to comment.