-
Notifications
You must be signed in to change notification settings - Fork 389
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(core): move VirtualizerScrollInstanceContext to singletons
- Loading branch information
Showing
4 changed files
with
15 additions
and
13 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
...ingletons/form/inputs/arrays/ArrayOfObjectsInput/List/VirtualizerScrollInstanceContext.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import {createContext} from 'react' | ||
import type {VirtualizerScrollInstance} from 'sanity' | ||
|
||
/** | ||
* This is used to store the reference to the scroll element for virtualizer | ||
* @internal | ||
*/ | ||
export const VirtualizerScrollInstanceContext = createContext<VirtualizerScrollInstance | null>( | ||
null, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 2 additions & 4 deletions
6
...rc/core/form/inputs/arrays/ArrayOfObjectsInput/List/VirtualizerScrollInstanceProvider.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters