-
Notifications
You must be signed in to change notification settings - Fork 103
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(Form): Use shared context for Form and FormItem (#275)
every form item had his own context as it was part of the bundled file. Now the Form shares a context with the FormItems. Fixes #274
- Loading branch information
1 parent
2211d4a
commit b403bdc
Showing
6 changed files
with
22 additions
and
17 deletions.
There are no files selected for viewing
6 changes: 3 additions & 3 deletions
6
packages/main/src/components/Form/CurrentViewportRangeContext.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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import React from 'react'; | ||
import { createContext } from 'react'; | ||
|
||
const CurrentRange = React.createContext(null); | ||
const CurrentViewportRangeContext = createContext(null); | ||
|
||
export { CurrentRange }; | ||
export { CurrentViewportRangeContext }; |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { CurrentViewportRangeContext } from '../components/Form/CurrentViewportRangeContext'; | ||
|
||
export { CurrentViewportRangeContext }; |
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