* Removed isSomeInputInEditMode * Removed console.log * Added a first version of generic cell text * Removed metadata from entity table V1 * Fix * Fix * Fix
17 lines
579 B
TypeScript
17 lines
579 B
TypeScript
import { useRecoilCallback } from 'recoil';
|
|
|
|
import { currentCellInEditModePositionState } from '../states/currentCellInEditModePositionState';
|
|
import { isCellInEditModeFamilyState } from '../states/isCellInEditModeFamilyState';
|
|
|
|
export function useCloseCurrentCellInEditMode() {
|
|
return useRecoilCallback(({ set, snapshot }) => {
|
|
return async () => {
|
|
const currentCellInEditModePosition = await snapshot.getPromise(
|
|
currentCellInEditModePositionState,
|
|
);
|
|
|
|
set(isCellInEditModeFamilyState(currentCellInEditModePosition), false);
|
|
};
|
|
}, []);
|
|
}
|