프로그래밍/React

[React] ag-grid 특정 행 disabled 처리

Gooding 2023. 5. 15. 20:00
728x90
반응형

ag-grid 특정 행 disabled 처리

ag-grid 특정 행의 스타일 변경 및 이벤트를 막고 싶은 경우 사용

이벤트를 막기위해서는 pointerEvents 옵션을 'none' 처리하기

 

간단한 예시

<AgGridReact
    ...
    getRowStyle={(params) => {
        if (params.data.isDeleted === 1) {
            return { background: 'gray', pointerEvents: 'none', color: 'fff' };
        }
        return null;
    }}
/>
반응형