// 개별 선택export const onCheckedHandler = ( e: ChangeEvent, item: any, setCheckItems: React.Dispatch>) => { if (e.target.checked) { setCheckItems(prev => [...prev, item]); } else { setCheckItems(prev => prev.filter(check => check.id !== item.id)); }};// 전체 선택 export const allCheckedHandler = ( e: ChangeEvent, data: any[], setCheckItems: React.Dispatch>) => { if (e.target.checked) {..
const highlightKeyword = (title: string, keyword: string) => { const parts = title.split(new RegExp(`(${keyword})`, "gi")); return parts.map((part, index) => part.toLowerCase() === keyword.toLowerCase() ? ( {part} ) : ( part ) ); }; {highlightKeyword(item.title, debouncedKeyword)} RegExp: 정규 표현식을 사용하기 위한 내장 객체new RegExp(($..