Files
twenty/front/src/modules/ui/tables/hooks/useResetTableRowSelection.ts

18 lines
446 B
TypeScript

import { useCallback } from 'react';
import { useSetRecoilState } from 'recoil';
import { currentRowSelectionState } from '../states/rowSelectionState';
export function useResetTableRowSelection() {
const setCurrentRowSelectionState = useSetRecoilState(
currentRowSelectionState,
);
return useCallback(
function resetCurrentRowSelection() {
setCurrentRowSelectionState({});
},
[setCurrentRowSelectionState],
);
}