Skip to content
Snippets Groups Projects
Commit 809aca3c authored by chris's avatar chris
Browse files

cleanup options

parent 0d3f739c
No related branches found
No related tags found
1 merge request!390Chat service
...@@ -12,7 +12,7 @@ const UndoRedoButton = ({ view = {}, item }) => { ...@@ -12,7 +12,7 @@ const UndoRedoButton = ({ view = {}, item }) => {
activeView, activeView,
options, options,
} = useContext(WaxContext); } = useContext(WaxContext);
console.log(useContext(WaxContext).options);
const isEditable = main.props.editable(editable => { const isEditable = main.props.editable(editable => {
return editable; return editable;
}); });
...@@ -31,7 +31,6 @@ const UndoRedoButton = ({ view = {}, item }) => { ...@@ -31,7 +31,6 @@ const UndoRedoButton = ({ view = {}, item }) => {
let isDisabled = !select(state, activeViewId, activeView); let isDisabled = !select(state, activeViewId, activeView);
if (!isEditable) isDisabled = true; if (!isEditable) isDisabled = true;
if (options.resetHistory) isDisabled = true;
const UndoRedoButtonComponent = useMemo( const UndoRedoButtonComponent = useMemo(
() => ( () => (
...@@ -44,7 +43,7 @@ const UndoRedoButton = ({ view = {}, item }) => { ...@@ -44,7 +43,7 @@ const UndoRedoButton = ({ view = {}, item }) => {
title={title} title={title}
/> />
), ),
[isActive, isDisabled, useContext(WaxContext).options], [isActive, isDisabled],
); );
return UndoRedoButtonComponent; return UndoRedoButtonComponent;
......
...@@ -33,7 +33,6 @@ export default props => { ...@@ -33,7 +33,6 @@ export default props => {
}, },
props: { props: {
handleKeyDown(view, event) { handleKeyDown(view, event) {
console.log(props);
if (event.key === 'Enter' && !event.shiftKey) { if (event.key === 'Enter' && !event.shiftKey) {
if (view.state.doc.content.size <= 2) { if (view.state.doc.content.size <= 2) {
return true; return true;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment