Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jinfa-platform
Project
Project
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
黄庭坚
jinfa-platform
Commits
21178661
Commit
21178661
authored
Apr 21, 2022
by
Bill
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feat-sortable-table' into 'v2-220418'
fix: 修复勾选框取消勾选再重新勾选,固定列位置错乱的问题 See merge request linkseeks-design/pro-platform!460
parents
763b30bc
0058885c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
1 deletion
+21
-1
CustomColumnsConfigureModal.tsx
...er/CustomColumnsConfigure/CustomColumnsConfigureModal.tsx
+21
-1
No files found.
src/components/SortableTableHeader/CustomColumnsConfigure/CustomColumnsConfigureModal.tsx
View file @
21178661
...
...
@@ -69,8 +69,28 @@ const CustomColumnsConfigureModal: React.ForwardRefRenderFunction<CustomColumnsC
}
return
columnsSource
.
find
((
column
)
=>
column
.
dataIndex
===
item
)
!
;
}).
filter
(
Boolean
);
const
fixedLeftItems
:
SortableColumnType
<
any
>
[]
=
[];
const
fixedRightItems
:
SortableColumnType
<
any
>
[]
=
[];
const
fixedNormalItems
:
SortableColumnType
<
any
>
[]
=
[];
// 重现排序
for
(
let
i
=
0
;
i
<
newInnerColumns
.
length
;
i
++
)
{
const
item
=
newInnerColumns
[
i
];
if
(
item
.
fixed
&&
item
.
fixed
===
'left'
)
{
fixedLeftItems
.
push
(
item
);
continue
;
}
if
(
item
.
fixed
&&
item
.
fixed
===
'right'
)
{
fixedRightItems
.
push
(
item
);
continue
;
}
fixedNormalItems
.
push
(
item
);
}
const
compouned
=
[...
fixedLeftItems
,
...
fixedNormalItems
,
...
fixedRightItems
];
setChecks
(
value
);
setInnerColumns
(
newInnerColumns
);
setInnerColumns
(
compouned
);
};
const
handleClose
=
(
dataIndex
:
string
)
=>
{
...
...
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