debug: 리사이즈 핸들 이벤트 디버그 로그 추가

- 마우스다운, 드래그, 마우스업 이벤트 로그
- 시작 너비, 이동 거리, 새 너비 출력
- 이벤트가 제대로 발생하는지 확인용
This commit is contained in:
kjs 2025-11-03 11:54:34 +09:00
parent 4a5c21a3ba
commit 9f501aa839
1 changed files with 4 additions and 0 deletions

View File

@ -1055,11 +1055,13 @@ export const TableListComponent: React.FC<TableListComponentProps> = ({
style={{ marginRight: '-4px', paddingLeft: '4px', paddingRight: '4px' }} style={{ marginRight: '-4px', paddingLeft: '4px', paddingRight: '4px' }}
onClick={(e) => e.stopPropagation()} // 정렬 클릭 방지 onClick={(e) => e.stopPropagation()} // 정렬 클릭 방지
onMouseDown={(e) => { onMouseDown={(e) => {
console.log('🖱️ 리사이즈 핸들 마우스다운', column.columnName);
e.preventDefault(); e.preventDefault();
e.stopPropagation(); e.stopPropagation();
const startX = e.clientX; const startX = e.clientX;
const startWidth = columnWidth || (e.currentTarget.parentElement?.offsetWidth || 100); const startWidth = columnWidth || (e.currentTarget.parentElement?.offsetWidth || 100);
console.log('시작 너비:', startWidth);
// 드래그 중 텍스트 선택 방지 // 드래그 중 텍스트 선택 방지
document.body.style.userSelect = 'none'; document.body.style.userSelect = 'none';
@ -1069,10 +1071,12 @@ export const TableListComponent: React.FC<TableListComponentProps> = ({
moveEvent.preventDefault(); moveEvent.preventDefault();
const diff = moveEvent.clientX - startX; const diff = moveEvent.clientX - startX;
const newWidth = Math.max(80, startWidth + diff); const newWidth = Math.max(80, startWidth + diff);
console.log('드래그 중:', { diff, newWidth });
setColumnWidths(prev => ({ ...prev, [column.columnName]: newWidth })); setColumnWidths(prev => ({ ...prev, [column.columnName]: newWidth }));
}; };
const handleMouseUp = () => { const handleMouseUp = () => {
console.log('마우스 업!');
// 텍스트 선택 복원 // 텍스트 선택 복원
document.body.style.userSelect = ''; document.body.style.userSelect = '';
document.body.style.cursor = ''; document.body.style.cursor = '';