Merge branch 'master' of github.com:keen-studio/payload

This commit is contained in:
James
2020-07-03 13:08:21 -04:00
2 changed files with 0 additions and 41 deletions

View File

@@ -253,9 +253,6 @@ const Form = (props) => {
contextRef.current.validateForm = () => {
return !Object.values(contextRef.current.fields).some((field) => {
if (field.valid === false) {
console.log(field, ' is not valid');
}
return field.valid === false;
});
};

View File

@@ -1,38 +0,0 @@
import React from 'react';
import PropTypes from 'prop-types';
import { useSlate } from 'slate-react';
import {
getPreventDefaultHandler,
ToolbarElement,
toggleList,
} from '@udecode/slate-plugins';
import { nodeTypes } from '../../types';
const ToolbarList = (props) => {
const { typeList } = props;
// const editor = useSlate();
console.log('render');
return null;
return (
<ToolbarElement
type={typeList}
onMouseDown={getPreventDefaultHandler(toggleList, editor, {
...props,
typeList,
})}
{...props}
/>
);
};
ToolbarList.defaultProps = {
typeList: nodeTypes.UL,
};
ToolbarList.propTypes = {
typeList: PropTypes.string,
};
export default ToolbarList;