Refactor/context and scopes (#1602)
* Put onImport in a context * Refactored RecoilScopeContexts * Refactored naming * Fix tests --------- Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
@ -8,10 +8,16 @@ import { tableColumnsScopedState } from '../tableColumnsScopedState';
|
||||
export const canPersistTableColumnsScopedFamilySelector = selectorFamily({
|
||||
key: 'canPersistTableColumnsScopedFamilySelector',
|
||||
get:
|
||||
([scopeId, viewId]: [string, string | undefined]) =>
|
||||
({
|
||||
recoilScopeId,
|
||||
viewId,
|
||||
}: {
|
||||
recoilScopeId: string;
|
||||
viewId: string | undefined;
|
||||
}) =>
|
||||
({ get }) =>
|
||||
!isDeeplyEqual(
|
||||
get(savedTableColumnsFamilyState(viewId)),
|
||||
get(tableColumnsScopedState(scopeId)),
|
||||
get(tableColumnsScopedState(recoilScopeId)),
|
||||
),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user