баги
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
import { CustomSelect } from '../../shared/ui/CustomSelect.jsx';
|
||||
|
||||
import { readUrlState, writeUrlState } from '../../../admin/js/url-state.js';
|
||||
import { trackUxEvent } from '../../../telemetry.js';
|
||||
@@ -83,6 +84,8 @@ export function SubjectsTab() {
|
||||
}, []);
|
||||
|
||||
async function loadSubjects(nextState) {
|
||||
stateRef.current = nextState;
|
||||
setState(nextState);
|
||||
const currentRequest = requestNumber.current + 1;
|
||||
requestNumber.current = currentRequest;
|
||||
setTableLoading(true);
|
||||
@@ -267,7 +270,7 @@ export function SubjectsTab() {
|
||||
</div>
|
||||
<div className="form-group">
|
||||
<label htmlFor="new-subject-department">Кафедра</label>
|
||||
<select
|
||||
<CustomSelect
|
||||
id="new-subject-department"
|
||||
required
|
||||
value={createDepartmentId}
|
||||
@@ -279,7 +282,7 @@ export function SubjectsTab() {
|
||||
{departmentOptionLabel(department)}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
</CustomSelect>
|
||||
</div>
|
||||
<button type="submit" className="btn btn-md btn-primary">Добавить</button>
|
||||
</div>
|
||||
@@ -307,7 +310,7 @@ export function SubjectsTab() {
|
||||
</div>
|
||||
<div className="form-group">
|
||||
<label htmlFor="subjects-department-filter">Кафедра</label>
|
||||
<select
|
||||
<CustomSelect
|
||||
id="subjects-department-filter"
|
||||
value={state.departmentId}
|
||||
onChange={event => applyState({ departmentId: event.target.value, page: 0 })}
|
||||
@@ -318,11 +321,11 @@ export function SubjectsTab() {
|
||||
{department.departmentName || department.name || department.id}
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
</CustomSelect>
|
||||
</div>
|
||||
<div className="form-group">
|
||||
<label htmlFor="subjects-sort">Сортировка</label>
|
||||
<select
|
||||
<CustomSelect
|
||||
id="subjects-sort"
|
||||
value={state.sort}
|
||||
onChange={event => applyState({ sort: event.target.value, page: 0 })}
|
||||
@@ -330,7 +333,7 @@ export function SubjectsTab() {
|
||||
{SUBJECT_SORT_OPTIONS.map(option => (
|
||||
<option key={option.value} value={option.value}>{option.label}</option>
|
||||
))}
|
||||
</select>
|
||||
</CustomSelect>
|
||||
</div>
|
||||
</div>
|
||||
<div className="table-wrap">
|
||||
|
||||
Reference in New Issue
Block a user