Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
szse
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhaochengxiang
szse
Commits
9f858c49
Commit
9f858c49
authored
May 29, 2024
by
zhaochengxiang
Browse files
Options
Browse Files
Download
Plain Diff
bug fix
parents
06865e81
2cbc7d21
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
43 deletions
+1
-43
ModelTable.jsx
src/view/Manage/Model/Component/ModelTable.jsx
+1
-43
No files found.
src/view/Manage/Model/Component/ModelTable.jsx
View file @
9f858c49
...
@@ -808,47 +808,6 @@ const ModelTable = (props) => {
...
@@ -808,47 +808,6 @@ const ModelTable = (props) => {
'model-table-sub': modelId
'model-table-sub': modelId
});
});
let expandable = undefined;
let needExpand = false;
if (!modelId) {
(filterData||[]).forEach(record => {
if (record?.alreadyCheckedOut) {
needExpand = true;
}
})
if (needExpand) {
expandable = {
expandedRowRender: record => <ModelTable
view={view}
modelId={record?.checkedOutId}
modelPid={record?.id}
onSubSelect={onSubSelectChange}
{...props}
/>,
expandIcon: ({ expanded, onExpand, record }) => {
if (!record?.alreadyCheckedOut) return null;
return expanded ? <UpOutlined style={{ fontSize: 10 }} onClick={e => onExpand(record, e)} /> : <DownOutlined style={{ fontSize: 10 }} onClick={e => onExpand(record, e)} />
},
rowExpandable: record => {
return record?.alreadyCheckedOut;
}
};
}
} else {
expandable = {
expandedRowRender: record => <></>,
expandIcon: ({ expanded, onExpand, record }) => {
return null;
},
rowExpandable: record => {
return false;
}
}
}
const displayMenu = (e) => {
const displayMenu = (e) => {
show({
show({
event: e
event: e
...
@@ -900,7 +859,7 @@ const ModelTable = (props) => {
...
@@ -900,7 +859,7 @@ const ModelTable = (props) => {
<Table
<Table
rowSelection={view!=='grant'?rowSelection:undefined}
rowSelection={view!=='grant'?rowSelection:undefined}
rowKey={'id'}
rowKey={'id'}
extraColWidth={
(modelId||needExpand)?85:
32}
extraColWidth={32}
columns={columns||[]}
columns={columns||[]}
dataSource={modelId?(subData||[]):(filterData||[])}
dataSource={modelId?(subData||[]):(filterData||[])}
pagination={false}
pagination={false}
...
@@ -918,7 +877,6 @@ const ModelTable = (props) => {
...
@@ -918,7 +877,6 @@ const ModelTable = (props) => {
rowClassName={(record, index) => (record?.id===anchorId)?'yy-table-select-row':''}
rowClassName={(record, index) => (record?.id===anchorId)?'yy-table-select-row':''}
scroll={{ y: modelId?null:((filterData||[]).length===0?null:'calc(100vh - 121px - 57px - 24px - 38px - 44px)') }}
scroll={{ y: modelId?null:((filterData||[]).length===0?null:'calc(100vh - 121px - 57px - 24px - 38px - 44px)') }}
onChange={onTableChange}
onChange={onTableChange}
expandable={!isOnlyEnding ? expandable : undefined}
/>
/>
{
{
!modelId && (data||[]).length>0 && <Pagination
!modelId && (data||[]).length>0 && <Pagination
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment