Skip to content

Commit

Permalink
Merge branch 'main' into rename_blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
sabrina-bongiovanni committed Nov 18, 2024
2 parents 09e1263 + c635fa6 commit 9c67f99
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ export default function ViewItem({ data }: Props) {
{data.headerTextPosition && (
<div className={cx(styles['header-text'])}>
{data.title && (
<h3
className={cx('block-iconsandtext-title', styles.title)}
>
<h3 className={cx('block-iconsandtext-title', styles.title)}>
{data.headerText}
</h3>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { defineMessages, useIntl } from 'react-intl';
import { useInView } from 'react-intersection-observer';

import './simpleTextEditorWidget.css';
import Caret from './Caret';
import config from '@plone/volto/registry';

const messages = defineMessages({
Expand Down Expand Up @@ -101,6 +100,7 @@ const SimpleTextEditorWidget = (props) => {
fieldRef.current.focus();
setDefaultCaretPosition();
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [selected]);

useEffect(() => {
Expand All @@ -110,6 +110,7 @@ const SimpleTextEditorWidget = (props) => {
fieldRef.current.innerText = _value;
if (selected) setDefaultCaretPosition();
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [value, data]);

const selectThis = () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ export const isLinkStyleActive = (editor, style) => {
}

if (found.length) {
for (const [n, p] of found) {
for (const [n] of found) {
if (n?.styleName?.indexOf(style) >= 0) {
return true;
}
Expand Down
3 changes: 3 additions & 0 deletions packages/volto-slate-extras/src/helpers/blocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,14 @@ export const useHandleDetachedBlockFocus = (
} else if (!selected) {
setSelectedField(null);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [selected]);

useEffect(() => {
if (!selected && selectedField && onSelectBlock) {
onSelectBlock(block);
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [selectedField]);

useEffect(() => {
Expand All @@ -74,6 +76,7 @@ export const useHandleDetachedBlockFocus = (
}
};
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [selected, selectedField]);

return { selectedField, setSelectedField };
Expand Down

0 comments on commit 9c67f99

Please sign in to comment.