fix: editor scrolling not working
This commit is contained in:
parent
6d9478f8f7
commit
c1860c072d
@ -666,7 +666,6 @@ export function loadEntries(collection: Collection, page = 0) {
|
|||||||
|
|
||||||
const backend = currentBackend(configState.config);
|
const backend = currentBackend(configState.config);
|
||||||
|
|
||||||
console.log('Trying to load page', page);
|
|
||||||
const loadAllEntries = 'nested' in collection || hasI18n(collection);
|
const loadAllEntries = 'nested' in collection || hasI18n(collection);
|
||||||
const append = !!(page && !isNaN(page) && page > 0) && !loadAllEntries;
|
const append = !!(page && !isNaN(page) && page > 0) && !loadAllEntries;
|
||||||
dispatch(entriesLoading(collection));
|
dispatch(entriesLoading(collection));
|
||||||
|
@ -92,8 +92,6 @@ const Editor = ({
|
|||||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||||
}, [collection, createBackup, slug]);
|
}, [collection, createBackup, slug]);
|
||||||
|
|
||||||
console.log('VERSION', version);
|
|
||||||
|
|
||||||
const [submitted, setSubmitted] = useState(false);
|
const [submitted, setSubmitted] = useState(false);
|
||||||
const handlePersistEntry = useCallback(
|
const handlePersistEntry = useCallback(
|
||||||
(opts: EditorPersistOptions = {}) => {
|
(opts: EditorPersistOptions = {}) => {
|
||||||
|
@ -55,17 +55,16 @@ const Editor = styled('div')`
|
|||||||
|
|
||||||
interface PreviewPaneContainerProps {
|
interface PreviewPaneContainerProps {
|
||||||
$blockEntry?: boolean;
|
$blockEntry?: boolean;
|
||||||
$overFlow?: boolean;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const PreviewPaneContainer = styled(
|
const PreviewPaneContainer = styled(
|
||||||
'div',
|
'div',
|
||||||
transientOptions,
|
transientOptions,
|
||||||
)<PreviewPaneContainerProps>(
|
)<PreviewPaneContainerProps>(
|
||||||
({ $blockEntry, $overFlow }) => `
|
({ $blockEntry }) => `
|
||||||
height: 100%;
|
height: 100%;
|
||||||
pointer-events: ${$blockEntry ? 'none' : 'auto'};
|
pointer-events: ${$blockEntry ? 'none' : 'auto'};
|
||||||
overflow-y: ${$overFlow ? 'auto' : 'hidden'};
|
overflow-y: auto;
|
||||||
`,
|
`,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -162,14 +162,10 @@ function entryDraftReducer(
|
|||||||
entry: set(newState.entry, `${dataPath.join('.')}.${path}`, value),
|
entry: set(newState.entry, `${dataPath.join('.')}.${path}`, value),
|
||||||
};
|
};
|
||||||
|
|
||||||
console.log('BEFORE I18N', { ...newState.entry });
|
|
||||||
|
|
||||||
if (i18n) {
|
if (i18n) {
|
||||||
newState = duplicateI18nFields(newState, field, i18n.locales, i18n.defaultLocale);
|
newState = duplicateI18nFields(newState, field, i18n.locales, i18n.defaultLocale);
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('AFTER I18N', { ...newState.entry });
|
|
||||||
|
|
||||||
const newData = get(newState.entry, dataPath) ?? {};
|
const newData = get(newState.entry, dataPath) ?? {};
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user