fix: table width overriden with custom styles
when custom styles are passed to Table component, they override the default width 100%. moving the style out of restProps fixes this issue while still allows customizing the width if wanted. Signed-off-by: Heikki Hellgren <heikki.hellgren@op.fi>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/core-components': patch
|
||||
---
|
||||
|
||||
Fixed Table width being overriden by custom styling
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user