This commit is contained in:
Lucas Bordeau
2023-10-27 11:25:14 +02:00
committed by GitHub
parent 3d5ee6d7ca
commit 1728045be4
3 changed files with 8 additions and 7 deletions

View File

@ -36,11 +36,13 @@ export const ObjectDataTableEffect = ({
const tableRecoilScopeId = useRecoilScopeId(TableRecoilScopeContext);
const handleViewSelect = useRecoilCallback(
({ set, snapshot }) =>
(viewId: string) => {
const currentView = snapshot.getLoadable(
currentViewIdScopedState({ scopeId: tableRecoilScopeId }),
).getValue()
(viewId: string) => {
const currentView = snapshot
.getLoadable(
currentViewIdScopedState({ scopeId: tableRecoilScopeId }),
)
.getValue();
if (currentView === viewId) {
return;
}