Commit cf0ce85a authored by 邓超's avatar 邓超

fix: 修改搜索人员bug

parent 187c5ce4
Pipeline #42972 passed with stages
in 7 minutes 16 seconds
...@@ -24,7 +24,7 @@ const CardCheck = props => { ...@@ -24,7 +24,7 @@ const CardCheck = props => {
setCheckedList(cardMsg.checkedList); setCheckedList(cardMsg.checkedList);
setIndeterminate(cardMsg.indeterminate); setIndeterminate(cardMsg.indeterminate);
setCheckAll(cardMsg.checkAll); setCheckAll(cardMsg.checkAll);
}, []); }, [cardMsg]);
// 获取勾选新增得数据 // 获取勾选新增得数据
const addData = (arr1, arr2) => arr2.filter(val => arr1.indexOf(val) === -1); const addData = (arr1, arr2) => arr2.filter(val => arr1.indexOf(val) === -1);
......
...@@ -17,7 +17,6 @@ const SelectUser = props => { ...@@ -17,7 +17,6 @@ const SelectUser = props => {
const [searchName, setSearchName] = useState(); const [searchName, setSearchName] = useState();
const [deleKey, setDeleKey] = useState(); // 删除用户的key值 const [deleKey, setDeleKey] = useState(); // 删除用户的key值
const [delFlag, setDelFlag] = useState(0); // 删除标识每次删除后加一 const [delFlag, setDelFlag] = useState(0); // 删除标识每次删除后加一
const cardRef = useRef();
useEffect(() => { useEffect(() => {
if (visible) { if (visible) {
setCurrentPage(1); setCurrentPage(1);
...@@ -232,6 +231,7 @@ const SelectUser = props => { ...@@ -232,6 +231,7 @@ const SelectUser = props => {
), ),
}, },
]; ];
console.log(allList, 'allList');
return ( return (
<> <>
<Modal <Modal
...@@ -266,7 +266,6 @@ const SelectUser = props => { ...@@ -266,7 +266,6 @@ const SelectUser = props => {
{allList.map((item, index) => ( {allList.map((item, index) => (
<div className={styles.checkBoxContent} key={item.groupId}> <div className={styles.checkBoxContent} key={item.groupId}>
<CardCheck <CardCheck
ref={cardRef}
cardMsg={item} cardMsg={item}
cardIndex={index} cardIndex={index}
callback={(val, newCheckList) => checkCallBack(val, newCheckList)} callback={(val, newCheckList) => checkCallBack(val, newCheckList)}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment