Skip to content

Commit be3a66c

Browse files
committed
[transform] Fix EuiTabbedContent width for JSON views.
1 parent ecc2c59 commit be3a66c

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

x-pack/legacy/plugins/ml/public/data_frame_analytics/pages/analytics_management/components/analytics_list/expanded_row.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,13 +103,20 @@ export const ExpandedRow: FC<Props> = ({ item }) => {
103103
},
104104
*/
105105
];
106+
107+
// Using `expand=false` here so the tabs themselves don't spread
108+
// across the full width. The 100% width is used so the bottom line
109+
// as well as the tab content spans across the full width.
110+
// EuiTabbedContent would do that usually anyway,
111+
// it just doesn't seem to work within certain layouts.
106112
return (
107113
<EuiTabbedContent
108114
size="s"
109115
tabs={tabs}
110116
initialSelectedTab={tabs[0]}
111117
onTabClick={() => {}}
112118
expand={false}
119+
style={{ width: '100%' }}
113120
/>
114121
);
115122
};

x-pack/legacy/plugins/transform/public/app/sections/transform_management/components/transform_list/__snapshots__/expanded_row.test.tsx.snap

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

x-pack/legacy/plugins/transform/public/app/sections/transform_management/components/transform_list/expanded_row.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,13 +156,19 @@ export const ExpandedRow: SFC<Props> = ({ item }) => {
156156
content: <ExpandedRowPreviewPane transformConfig={item.config} />,
157157
},
158158
];
159+
160+
// Using `expand=false` here so the tabs themselves don't spread
161+
// across the full width. The 100% width is used so the bottom line
162+
// as well as the tab content spans across the full width,
163+
// even if the tab content wouldn't extend to the full width.
159164
return (
160165
<EuiTabbedContent
161166
size="s"
162167
tabs={tabs}
163168
initialSelectedTab={tabs[0]}
164169
onTabClick={() => {}}
165170
expand={false}
171+
style={{ width: '100%' }}
166172
/>
167173
);
168174
};

0 commit comments

Comments
 (0)