fix(table): smooth list empty/loading transitions, no layout jump on entry

Reserve a stable block for the empty/loading state (matching the NoResult
height) and fade the empty state in, so entering a list page no longer jumps
between spinner, empty result, and rows. Apply scroll-table to the antd main
lists and pass emptyMinHeight to the SealTable-based lists.
This commit is contained in:
jialin
2026-07-15 14:05:19 +08:00
committed by jialin
parent 2dd287bbc1
commit eb029a3e2a
15 changed files with 46 additions and 4 deletions
+2 -2
View File
@@ -123,14 +123,14 @@ const GPUList: React.FC<GPUListProps> = ({ clusterId, source }) => {
columns={columns}
sortDirections={TABLE_SORT_DIRECTIONS}
showSorterTooltip={false}
tableLayout={'auto'}
scroll={{ x: 'max-content' }}
className={'scroll-table'}
dataSource={dataSource.dataList}
loading={{
spinning: dataSource.loading,
size: 'middle'
}}
rowKey="id"
scroll={{ x: 900 }}
onChange={handleTableChange}
pagination={{
showSizeChanger: true,
@@ -340,6 +340,7 @@ const ModelFiles = () => {
></FilterBar>
<ConfigProvider renderEmpty={renderEmpty}>
<Table
className={'scroll-table'}
rowKey="id"
tableLayout="fixed"
sortDirections={TABLE_SORT_DIRECTIONS}
+1 -2
View File
@@ -303,7 +303,7 @@ const Workers: React.FC<WorkersProps> = ({ clusterId, source }) => {
columns={columns}
sortDirections={TABLE_SORT_DIRECTIONS}
showSorterTooltip={false}
tableLayout={'auto'}
scroll={{ x: 'max-content' }}
className={'scroll-table'}
dataSource={dataSource.dataList}
loading={{
@@ -311,7 +311,6 @@ const Workers: React.FC<WorkersProps> = ({ clusterId, source }) => {
size: 'middle'
}}
rowKey="id"
scroll={{ x: 900 }}
onChange={handleTableChange}
rowSelection={source === 'clusterDetail' ? undefined : rowSelection}
pagination={{