Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
wax-prosemirror
Manage
Activity
Members
Labels
Plan
Issues
34
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
wax
wax-prosemirror
Commits
0f3c6156
Commit
0f3c6156
authored
3 years ago
by
chris
Browse files
Options
Downloads
Patches
Plain Diff
remove mounted
parent
34a1ff41
No related branches found
No related tags found
1 merge request
!391
Matching question
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
wax-prosemirror-core/src/WaxView.js
+3
-9
3 additions, 9 deletions
wax-prosemirror-core/src/WaxView.js
with
3 additions
and
9 deletions
wax-prosemirror-core/src/WaxView.js
+
3
−
9
View file @
0f3c6156
...
@@ -6,7 +6,6 @@ import React, {
...
@@ -6,7 +6,6 @@ import React, {
useCallback
,
useCallback
,
useMemo
,
useMemo
,
useEffect
,
useEffect
,
useState
,
forwardRef
,
forwardRef
,
useImperativeHandle
,
useImperativeHandle
,
}
from
'
react
'
;
}
from
'
react
'
;
...
@@ -46,7 +45,6 @@ const WaxView = forwardRef((props, ref) => {
...
@@ -46,7 +45,6 @@ const WaxView = forwardRef((props, ref) => {
}
=
props
;
}
=
props
;
const
WaxEditorRef
=
useRef
();
const
WaxEditorRef
=
useRef
();
const
[
mounted
,
setMounted
]
=
useState
(
false
);
const
context
=
useContext
(
WaxContext
);
const
context
=
useContext
(
WaxContext
);
const
{
createPortal
}
=
useContext
(
PortalContext
);
const
{
createPortal
}
=
useContext
(
PortalContext
);
...
@@ -54,11 +52,6 @@ const WaxView = forwardRef((props, ref) => {
...
@@ -54,11 +52,6 @@ const WaxView = forwardRef((props, ref) => {
const
schema
=
context
.
app
.
getSchema
();
const
schema
=
context
.
app
.
getSchema
();
if
(
!
mounted
)
{
context
.
app
.
bootServices
();
context
.
app
.
getShortCuts
();
}
const
setEditorRef
=
useCallback
(
const
setEditorRef
=
useCallback
(
// eslint-disable-next-line consistent-return
// eslint-disable-next-line consistent-return
node
=>
{
node
=>
{
...
@@ -68,6 +61,9 @@ const WaxView = forwardRef((props, ref) => {
...
@@ -68,6 +61,9 @@ const WaxView = forwardRef((props, ref) => {
// clean up the unmount if you need to.
// clean up the unmount if you need to.
}
}
if
(
node
)
{
if
(
node
)
{
context
.
app
.
bootServices
();
context
.
app
.
getShortCuts
();
const
options
=
WaxOptions
({
const
options
=
WaxOptions
({
...
props
,
...
props
,
schema
,
schema
,
...
@@ -99,8 +95,6 @@ const WaxView = forwardRef((props, ref) => {
...
@@ -99,8 +95,6 @@ const WaxView = forwardRef((props, ref) => {
},
},
);
);
setMounted
(
true
);
context
.
updateView
(
context
.
updateView
(
{
{
main
:
view
,
main
:
view
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment