mirror of
https://github.com/nocobase/nocobase
synced 2024-11-15 04:55:44 +00:00
fix: column width issue with scroll.y when table has no data (#5256)
This commit is contained in:
parent
961e14bcef
commit
ab719cf960
@ -714,9 +714,9 @@ export const Table: any = withDynamicSchemaProps(
|
|||||||
const scroll = useMemo(() => {
|
const scroll = useMemo(() => {
|
||||||
return {
|
return {
|
||||||
x: 'max-content',
|
x: 'max-content',
|
||||||
y: tableHeight,
|
y: dataSource.length > 0 ? tableHeight : undefined,
|
||||||
};
|
};
|
||||||
}, [tableHeight, maxContent]);
|
}, [tableHeight, maxContent, dataSource]);
|
||||||
|
|
||||||
const rowClassName = useCallback(
|
const rowClassName = useCallback(
|
||||||
(record) => (selectedRow.includes(record[rowKey]) ? highlightRow : ''),
|
(record) => (selectedRow.includes(record[rowKey]) ? highlightRow : ''),
|
||||||
@ -754,6 +754,9 @@ export const Table: any = withDynamicSchemaProps(
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
.ant-table-expanded-row-fixed {
|
||||||
|
min-height: ${tableHeight}px;
|
||||||
|
}
|
||||||
.ant-table-body {
|
.ant-table-body {
|
||||||
min-height: ${tableHeight}px;
|
min-height: ${tableHeight}px;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user