18 lines
446 B
TypeScript
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],
|
|
);
|
|
}
|