Skip to content

Commit

Permalink
fix: todo list custom extension
Browse files Browse the repository at this point in the history
  • Loading branch information
aaryan610 committed Oct 18, 2024
1 parent 47b7853 commit 1e502f4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 3 additions & 4 deletions packages/editor/src/core/extensions/mentions/extension.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,9 @@ export const CustomMention = ({
return;
}

popup &&
popup[0].setProps({
getReferenceClientRect: props.clientRect,
});
popup?.[0].setProps({
getReferenceClientRect: props.clientRect,
});
},

onKeyDown: (props: { event: KeyboardEvent }) => {
Expand Down
4 changes: 3 additions & 1 deletion packages/editor/src/core/extensions/todo-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ type Props = {
readOnly?: boolean;
};

export const CustomTodoListExtension = (props?: Props): (Extension<any, any> | Node<any, any> | Mark<any, any>)[] => {
export const CustomTodoListExtension = (
props: Props = {}
): (Extension<any, any> | Node<any, any> | Mark<any, any>)[] => {
const { readOnly } = props;

return [
Expand Down

0 comments on commit 1e502f4

Please sign in to comment.