Skip to content

Commit

Permalink
Merge pull request #993 from EscolaLMS/fix/SUD-275/page-size
Browse files Browse the repository at this point in the history
fix: Page size SUD-275
  • Loading branch information
Haxikowy authored Jan 8, 2024
2 parents bb23b75 + 5f89afd commit 4f9c40a
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/pages/TeacherSubjects/components/Attendances.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export const Attendances: React.FC = () => {
columns={columns}
search={{ layout: 'vertical' }}
pagination={{
pageSize: TEACHER_SUBJECTS_PAGE_SIZE,
defaultPageSize: TEACHER_SUBJECTS_PAGE_SIZE,
onChange: () => actionRef.current?.reload(),
}}
scroll={{ x: 1500 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ export const ClassRegister: React.FC = () => {
scroll={{ x: 1500 }}
actionRef={actionRef}
pagination={{
pageSize: TEACHER_SUBJECTS_PAGE_SIZE,
defaultPageSize: TEACHER_SUBJECTS_PAGE_SIZE,
onChange: () => actionRef.current?.reload(),
}}
rowKey="id"
Expand Down
2 changes: 1 addition & 1 deletion src/pages/TeacherSubjects/components/ExamForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ export const ExamForm: React.FC<Props> = ({ exam_id }) => {
cardProps={{ bodyStyle: { paddingInline: 0 } }}
search={false}
dataSource={convertedData.exam_results}
pagination={{ pageSize: TEACHER_SUBJECTS_PAGE_SIZE }}
pagination={{ defaultPageSize: TEACHER_SUBJECTS_PAGE_SIZE }}
columns={staticColumns}
/>
)}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/TeacherSubjects/components/ExamResults.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const ExamResults: React.FC<Props> = ({ exam_id }) => {
rowKey="user_id"
search={false}
headerTitle={title}
pagination={{ pageSize: TEACHER_SUBJECTS_PAGE_SIZE }}
pagination={{ defaultPageSize: TEACHER_SUBJECTS_PAGE_SIZE }}
request={async () => {
const response = await getExam(exam_id);

Expand Down
2 changes: 1 addition & 1 deletion src/pages/TeacherSubjects/components/Exams.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export const Exams: React.FC = () => {
actionRef={actionRef}
search={false}
rowKey="id"
pagination={{ pageSize: TEACHER_SUBJECTS_PAGE_SIZE }}
pagination={{ defaultPageSize: TEACHER_SUBJECTS_PAGE_SIZE }}
request={async ({ current, pageSize }, sort) => {
if (semester_subject_id === null)
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export const FileExportsHistory: React.FC = () => {
columns={columns}
search={{ layout: 'vertical' }}
scroll={{ x: 1500 }}
pagination={{ pageSize: TEACHER_SUBJECTS_PAGE_SIZE }}
pagination={{ defaultPageSize: TEACHER_SUBJECTS_PAGE_SIZE }}
/>
);
};
2 changes: 1 addition & 1 deletion src/pages/TeacherSubjects/components/FinalGradesList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export const FinalGradesList: React.FC = () => {
className="table-standalone"
rowKey="id"
search={{ layout: 'vertical' }}
pagination={{ pageSize: TEACHER_SUBJECTS_PAGE_SIZE }}
pagination={{ defaultPageSize: TEACHER_SUBJECTS_PAGE_SIZE }}
request={async ({ group_id: group_ids = [], first_name = '', last_name = '' }) => {
const allGroups = (teacherSubjectData?.groups ?? []).map(({ id }) => id);

Expand Down
2 changes: 1 addition & 1 deletion src/pages/TeacherSubjects/components/Groups.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export const Groups: React.FC = () => {
rowKey="id"
search={false}
dataSource={teacherSubjectData?.groups ?? []}
pagination={{ pageSize: TEACHER_SUBJECTS_PAGE_SIZE }}
pagination={{ defaultPageSize: TEACHER_SUBJECTS_PAGE_SIZE }}
columns={[
...TableColumns,
{
Expand Down
2 changes: 1 addition & 1 deletion src/pages/TeacherSubjects/components/Students.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export const Students: React.FC = () => {
className="table-standalone"
rowKey={(record) => `${record.group_id}-${record.user_id}`}
search={{ layout: 'vertical' }}
pagination={{ pageSize: TEACHER_SUBJECTS_PAGE_SIZE }}
pagination={{ defaultPageSize: TEACHER_SUBJECTS_PAGE_SIZE }}
request={async ({ groups, first_name = '', last_name = '', email = '' }) => {
const response = await fetchAllStudentsAndGroups({
parent_id: teacherSubjectData?.group_id,
Expand Down
2 changes: 1 addition & 1 deletion src/pages/TeacherSubjects/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ const TableList: React.FC = () => {
search={{
layout: 'vertical',
}}
pagination={{ pageSize: TEACHER_SUBJECTS_PAGE_SIZE }}
pagination={{ defaultPageSize: TEACHER_SUBJECTS_PAGE_SIZE }}
request={({ pageSize, current, semester_id }) => {
return semesterSubjects({ per_page: pageSize, page: current, semester_id }).then(
(response) => {
Expand Down

0 comments on commit 4f9c40a

Please sign in to comment.