feat: use new component state api for record table (#8143)

This PR drop the use of the old component state api in favour of the new
component state api V2.
This commit is contained in:
Jérémy M
2024-11-04 12:07:07 +01:00
committed by GitHub
parent 740ca550cc
commit 258fd07839
110 changed files with 971 additions and 870 deletions

View File

@ -1,14 +1,14 @@
import { RecordTableScopeInternalContext } from '@/object-record/record-table/scopes/scope-internal-context/RecordTableScopeInternalContext';
import { RecordTableComponentInstanceContext } from '@/object-record/record-table/states/context/RecordTableComponentInstanceContext';
import { getRelationPickerScopedStates } from '@/object-record/relation-picker/utils/getRelationPickerScopedStates';
import { useAvailableScopeIdOrThrow } from '@/ui/utilities/recoil-scope/scopes-internal/hooks/useAvailableScopeId';
import { useAvailableComponentInstanceIdOrThrow } from '@/ui/utilities/state/component-state/hooks/useAvailableComponentInstanceIdOrThrow';
export const useRelationPickerScopedStates = (args?: {
relationPickerScopedId?: string;
}) => {
const { relationPickerScopedId } = args ?? {};
const scopeId = useAvailableScopeIdOrThrow(
RecordTableScopeInternalContext,
const scopeId = useAvailableComponentInstanceIdOrThrow(
RecordTableComponentInstanceContext,
relationPickerScopedId,
);