From fdf49f38cdde686b945e1ece24264e12a95b000f Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Thu, 18 Jul 2019 15:02:38 +0800 Subject: [PATCH] course_groups && course_groups.length --- .../modules/courses/members/modal/CourseGroupChooserModal.js | 4 ++-- public/react/src/modules/courses/members/teacherList.js | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/courses/members/modal/CourseGroupChooserModal.js b/public/react/src/modules/courses/members/modal/CourseGroupChooserModal.js index d03969629..dc3044cc0 100644 --- a/public/react/src/modules/courses/members/modal/CourseGroupChooserModal.js +++ b/public/react/src/modules/courses/members/modal/CourseGroupChooserModal.js @@ -1,4 +1,4 @@ -import React, { useState, useEffect, useRef } from 'react' +import React, { useState, useEffect, useRef, memo } from 'react' import { trigger } from 'educoder' import { Input, Checkbox } from "antd"; import CourseGroupChooser from '../CourseGroupChooser' @@ -105,4 +105,4 @@ function CourseGroupChooserModal({ course_groups = [], isAdminOrCreator, item, i ) } -export default CourseGroupChooserModal \ No newline at end of file +export default memo(CourseGroupChooserModal) \ No newline at end of file diff --git a/public/react/src/modules/courses/members/teacherList.js b/public/react/src/modules/courses/members/teacherList.js index 164da95d3..f52f5e115 100644 --- a/public/react/src/modules/courses/members/teacherList.js +++ b/public/react/src/modules/courses/members/teacherList.js @@ -190,6 +190,7 @@ class studentsList extends Component{ checkBoxValues: [], isSpin:false, application_list: [], + course_groups: [], checkAllArray: [], filterKey: 1, // 1 已审批 2 待审批 } @@ -666,14 +667,14 @@ class studentsList extends Component{ `}
- + > } {filterKey == '1' &&
{ isAdminOrTeacher && hasGraduationModule && 已选 {checkBoxValues.length} 个 } { filterKey == '1' &&