diff --git a/public/react/src/modules/courses/members/CourseGroupChooser.js b/public/react/src/modules/courses/members/CourseGroupChooser.js new file mode 100644 index 000000000..7974b70dd --- /dev/null +++ b/public/react/src/modules/courses/members/CourseGroupChooser.js @@ -0,0 +1,80 @@ +import React, { useState, useEffect } from 'react' +import { trigger } from 'educoder' +import { Input, Checkbox } from "antd"; + +function CourseGroupChooser({ course_groups, isAdminOrCreator, item, index, arg_course_groups, checkAllValue + , coursesids, onCheckAllChange, joinCourseGroup }) { + const [state, setState] = useState({counter: 0}) + const [search, setSearch] = useState('') + // useEffect(() => { + // console.log(' cdm') + // return () => { + // console.log(' cwum') + // }; + // // , [state.counter] 加了这个后,onClick就消失了 加错位置了? + // }, [state.counter] ) + // TODO 为什么每次onClick都会执行 cwum + + // const add1ToCounter = () => { + // const newCounterValue = state.counter + 1 + // setState({ counter: newCounterValue }) + // } + + /** + that.state.groupSearchValue + that.setState({groupSearchValue: e.target.value}) + + that.onCheckAllChange(e, item, index) - onCheckAllChange(e, item, index) + that.joinCourseGroup(checkedValues, item, index) - joinCourseGroup(checkedValues, item, index) + + that.state.checkAllArray[index] - checkAllValue + */ + + return ( +
+ {setSearch(e.target.value)}} allowClear/> +
): + '' + } + +- {that.setState({groupSearchValue: e.target.value})}} allowClear/> -
): - '' - } - {course_groups && course_groups.length > 1 &&