fix: failed field auto scroll in view

This commit is contained in:
jialin
2025-11-07 16:54:33 +08:00
parent fdb6ac7575
commit 9ffd4def64
10 changed files with 73 additions and 351 deletions
+13 -2
View File
@@ -18,6 +18,7 @@ const GPUList: React.FC = () => {
extraStatus,
handlePageChange,
handleTableChange,
handleQueryChange,
handleSearch,
handleNameChange
} = useTableFetch<GPUDeviceItem>({
@@ -44,6 +45,13 @@ const GPUList: React.FC = () => {
}
};
const handleClusterChange = (value: number) => {
handleQueryChange({
page: 1,
cluster_id: value
});
};
const renderEmpty = (type?: string) => {
if (type !== 'Table') return;
return (
@@ -79,13 +87,16 @@ const GPUList: React.FC = () => {
<PageBox>
<FilterBar
marginBottom={22}
marginTop={30}
buttonText={intl.formatMessage({ id: 'resources.button.create' })}
selectHolder={intl.formatMessage({ id: 'clusters.filterBy.cluster' })}
handleSearch={handleSearch}
handleInputChange={handleNameChange}
handleSelectChange={handleClusterChange}
showDeleteButton={false}
showPrimaryButton={false}
width={{ input: 300 }}
selectOptions={clusterList}
showSelect
width={{ input: 200 }}
></FilterBar>
<ConfigProvider renderEmpty={renderEmpty}>
<Table