1.3 KiB
I will modify src/pages/admin/ExamTaskPage.tsx to optimize the user selection display and the table layout.
Implementation Steps:
-
Optimize User Selection (
SelectComponent):-
Add
optionLabelProp="label"to theSelectcomponent. -
Update
Select.Optionto include alabel={user.name}prop. -
This ensures that while the dropdown still shows "Name (Phone)" for clarity, the selected tags in the input box will only show "Name", saving significant space.
-
-
Optimize Table Layout (
columnsConfiguration):-
Task Name & Subject: Add specific
widthproperties (e.g.,200pxand150px) andellipsis: trueto the "Task Name" and "Exam Subject" columns to give them more space and handle overflow gracefully. -
Action Column: Change the
<Space>component in the "Action" column to<Space direction="vertical" size={0}>. This will stack the "Edit", "Report", and "Delete" buttons vertically, reducing the column's required width. I will also set a fixed, narrower width for this column.
-
-
Verification:
-
Verify that selected users in the form only show their names.
-
Verify that the table "Action" column is narrower with vertically stacked buttons.
-
Verify that "Task Name" and "Exam Subject" columns are wider.
-