Skip to content

fix(fe): prevent course delete modal from opening without selection#3639

Merged
seoeun9 merged 5 commits into
mainfrom
t2762-fix-bug-image
Jul 20, 2026
Merged

fix(fe): prevent course delete modal from opening without selection#3639
seoeun9 merged 5 commits into
mainfrom
t2762-fix-bug-image

Conversation

@HajunPark-skku

Copy link
Copy Markdown
Contributor

Description

  • course 테이블에서 선택된 row가 없을 때 삭제 확인 모달이 열리지 않도록 수정했습니다.
  • 선택된 항목이 없을 때 기존 에러 토스트는 그대로 유지했습니다.

Changes

  • 선택된 row 없이 삭제 버튼을 클릭한 경우 event.preventDefault()를 호출하도록 수정했습니다.
  • 이를 통해 AlertModal의 trigger 동작으로 인해 삭제 확인 모달이 열리는 문제를 방지했습니다.

Tests

  • course를 선택하지 않은 상태에서 삭제 버튼을 클릭했습니다.
    • 에러 토스트가 정상적으로 표시됩니다.
    • 삭제 확인 모달은 열리지 않습니다.
  • course를 선택한 뒤 삭제 버튼을 클릭했습니다.
    • 삭제 확인 모달이 정상적으로 열립니다.

Before submitting the PR, please make sure you do the following

스크린샷 2026-07-08 10 52 18 스크린샷 2026-07-08 10 53 30

Closes TAS-2762

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the DataTableDeleteButton component to accept a mouse event in handleDeleteButtonClick and call event.preventDefault() when no rows are selected. The reviewer identified a bug where the delete confirmation modal opens prematurely during asynchronous checks when getCanDelete is provided. They suggested calling event.preventDefault() synchronously when getCanDelete is present to prevent this behavior.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread apps/frontend/app/admin/_components/table/DataTableDeleteButton.tsx
@seoeun9 seoeun9 added ⛳️ team-frontend preview 이 라벨이 붙어있어야 프론트엔드 Preview 환경이 생성됩니다 labels Jul 8, 2026
@skkuding-bot

skkuding-bot Bot commented Jul 8, 2026

Copy link
Copy Markdown

Syncing Preview App Succeeded

Application: frontend
Revision: 89e8ca4c51b28816e904353f590688bc5ba68f0d
Health Status: Healthy

Open Preview | View in Argo CD

@skkuding-bot

skkuding-bot Bot commented Jul 14, 2026

Copy link
Copy Markdown

Syncing Preview App Succeeded

Application: frontend
Revision: 62fa8d1313f13d9e1b544471a826631a5193dfcc
Health Status: Healthy

Open Preview | View in Argo CD

@skkuding-bot

skkuding-bot Bot commented Jul 16, 2026

Copy link
Copy Markdown

Syncing Preview App Succeeded

Application: frontend
Revision: 382182b29280c816b7f440a11f61df370ba0297a
Health Status: Healthy

Open Preview | View in Argo CD

@egg-zz egg-zz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM~

@seoeun9
seoeun9 enabled auto-merge July 20, 2026 03:15
@skkuding-bot

skkuding-bot Bot commented Jul 20, 2026

Copy link
Copy Markdown

Syncing Preview App Succeeded

Application: frontend
Revision: 48f3fde141c5b64a38f49898ae6afc461e5ed370
Health Status: Healthy

Open Preview | View in Argo CD

@seoeun9
seoeun9 added this pull request to the merge queue Jul 20, 2026
Merged via the queue into main with commit 4ed7e09 Jul 20, 2026
19 checks passed
@seoeun9
seoeun9 deleted the t2762-fix-bug-image branch July 20, 2026 06:17
@skkuding-bot skkuding-bot Bot removed the preview 이 라벨이 붙어있어야 프론트엔드 Preview 환경이 생성됩니다 label Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants