Merge pull request #26681 from drodil/table_style

fix: table width overriden with custom styles
This commit is contained in:
Patrik Oldsberg
2024-09-14 15:01:19 +02:00
committed by GitHub
2 changed files with 7 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/core-components': patch
---
Fixed `Table` width being overridden by custom `style` prop.
@@ -350,6 +350,7 @@ export function Table<T extends object = {}>(props: TableProps<T>) {
onStateChange,
components,
isLoading: loading,
style,
...restProps
} = props;
const tableClasses = useTableStyles();
@@ -483,7 +484,7 @@ export function Table<T extends object = {}>(props: TableProps<T>) {
</>
}
data={tableData}
style={{ width: '100%' }}
style={{ width: '100%', ...style }}
localization={{
toolbar: { searchPlaceholder: 'Filter', searchTooltip: 'Filter' },
...localization,